For developers

OTPConnect API Documentation

Buy numbers, fetch OTP codes and cancel — the same engine behind our dashboard, wrapped in clean JSON.

Your API Key

Log in to see your personal API key.

Login to get your key

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

ActionParametersReturns
getBalance—balance (your wallet)
getServicesq? (search)services[] {code, name}
getCountriesq? (search)countries[] {code, name}
getPriceservice, countryprice — your charge for this combo
getNumber spends walletservice, country, server? (default any)id, phone, price
getStatusidstate: wait / got (otp) / refunded / expired / cancelled
cancelidRefund if provider confirms no OTP (pay-per-OTP); or delivers a late otp instead
completeidMarks 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.