For developers
OTPConnect API Documentation
Buy numbers, fetch OTP codes and cancel — the same engine behind our dashboard, wrapped in clean JSON.
Base URL & Auth
Every request goes to:
https://bot.rhzsite.in/api/v1/{action}
Authenticate with your key in the X-API-Key header (or Authorization: Bearer <key>). All actions accept GET or POST. Responses are JSON.
HTTP/1.1 200 OK
Content-Type: application/json
{ "status": true, "action": "getBalance", "balance": 125.5 }
Errors return "status": false with an error code, e.g. NO_BALANCE, NO_NUMBERS, BAD_SERVICE, EARLY_CANCEL, NO_ACTIVATION, BAD_KEY.
Endpoints
| Action | Parameters | Returns |
|---|---|---|
| getBalance | — | balance (your wallet) |
| getServices | q? (search) | services[] {code, name} |
| getCountries | q? (search) | countries[] {code, name} |
| getPrice | service, country | price — your charge for this combo |
| getNumber spends wallet | service, country, server? (default any) | id, phone, price |
| getStatus | id | state: wait / got (otp) / refunded / expired / cancelled |
| cancel | id | Refund if provider confirms no OTP (pay-per-OTP); or delivers a late otp instead |
| complete | id | Marks a received activation finished |
Quick Examples
Balance
curl 'https://bot.rhzsite.in/api/v1/getBalance' \
-H 'X-API-Key: YOUR_API_KEY'
Get a number
curl 'https://bot.rhzsite.in/api/v1/getNumber' \
-H 'X-API-Key: YOUR_API_KEY' \
-d 'service=wa&country=22'
Check OTP
curl 'https://bot.rhzsite.in/api/v1/getStatus' \
-H 'X-API-Key: YOUR_API_KEY' \
-d 'id=12345'
Cancel + refund
curl 'https://bot.rhzsite.in/api/v1/cancel' \
-H 'X-API-Key: YOUR_API_KEY' \
-d 'id=12345'
Recommended flow
getPrice -> show the user the cost
getNumber -> you now hold id + phone, wallet charged
loop getStatus(id) every 5-10s:
state=wait -> keep waiting
state=got -> use otp, call complete(id)
still waiting after hold window -> call cancel(id)
-> refunded:true (money back) or
-> otp_arrived (charge stands)
Polling is throttled server-side (provider check every few seconds per order), so polling from your side is cheap. getNumber is not idempotent — each call buys a fresh number.