← All docsGet Started

POST /api/otp/send

Integration test

Copy this sequence into your system to prove the API is live.

Run these steps on this machine. If they pass, your integration is talking to a working OneGate.

1) Confirm the site

curl -s -o /dev/null -w "%{http_code}" http://31.97.184.139:3016

Expect 200.

2) Send Gmail OTP

Replace YOUR_API_KEY and the Gmail address.

curl -s -X POST http://31.97.184.139:3016/api/otp/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"recipient":"asadaso991@gmail.com","channel":"email","purpose":"integration-test"}'

Expect JSON with success true, cost_usd 15, and a lower balance_usd.

3) Read the code from Gmail and verify

curl -s -X POST http://31.97.184.139:3016/api/otp/verify \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"recipient":"asadaso991@gmail.com","otp":"PASTE_CODE","request_id":REQUEST_ID}'

Expect message "OTP verified".

4) WhatsApp (optional)

Connect WhatsApp Web in the dashboard, then send channel "whatsapp". Expect cost_usd 35.

From your own system

Keep the same paths and JSON. It works in PHP, Node.js, Python, Java, C#, Go, Ruby, and any HTTP client. Only change:

• Base URL to http://31.97.184.139:3016

• YOUR_API_KEY to a live key