Developer reference · LibOTP wallet
Prepaid wallet billing. Pass api_key + action as query
params. Responses are plain text.
API discount
—
On getNumber
API access is disabled by admin. Your key will not work until it is re-enabled.
Either path hits the same handler. Method: GET.
Send your key as api_key (also apiKey, key, or
header X-Api-Key). Invalid key → BAD_KEY.
Returns your wallet balance in INR.
ACCESS_BALANCE:123.45
List country codes. Use codes like IN, US — never numeric
ids.
IN:India US:United States …
Loading country codes…
Live service list. Prefixes: s1_ Server 01 · s2_ Server 02
(New Stock). Same app name can exist on both — e.g. s1_jiomart vs
s2_jiomart. Full list below (searchable) — same data as the API.
Loading service codes…
Live sell prices (INR) for a country. Returns one line per priced service:
serviceCode:price. Server 01 is complete; New Stock includes popular
apps by default — pass full=1 or server=2 for all S02, or
service=s2_jiomart for one code. Optional
format=json.
| Param | Required | Notes |
|---|---|---|
country |
no | Default IN |
service |
no | Price one opaque code only |
server |
no | 1 = Server 01 · 2 = New Stock |
full |
no | 1 = price all New Stock services (slower, cached) |
s1_jiomart:16.08 s2_jiomart:19.31 s2_whatsapp:12.5 …
Loading prices…
Buy a temporary number. Debits wallet (API discount applied if set). Live tester: /api-lab.
| Param | Required | Notes |
|---|---|---|
service |
yes |
From getServices (e.g. s2_whatsapp,
s2_jiomart, s1_jiomart)
|
country |
no | Default IN |
operator |
no |
Optional pin (e.g. 4). If omitted, API auto-tries live operators
by price until one returns a number. Website “Server N” on New Stock =
operator N. Alias param: server.
|
maxPrice |
no | INR sell cap. Values of 1 or below are ignored (common script default). |
ACCESS_NUMBER:<activationId>:<phoneDigits>
Poll for SMS / OTP. Call every 3–5 seconds.
| Param | Required | Notes |
|---|---|---|
id |
yes | Activation id from getNumber |
STATUS_WAIT_CODE STATUS_OK:123456 STATUS_CANCEL
Cancel, finish, or request the next SMS on an activation.
| status | Meaning |
|---|---|
8 |
Cancel (refund when eligible) |
6 |
Finish |
3 |
Request next SMS |
getBalance — check walletgetNumber — parse ACCESS_NUMBER:id:phonegetStatus every 3–5s until STATUS_OK:codesetStatus=8
API discount (if assigned by admin) applies automatically on
getNumber.
| Code | Meaning |
|---|---|
BAD_KEY |
Invalid or missing API key |
NO_BALANCE |
Wallet too low |
NO_NUMBERS |
No stock for that service/country |
MAX_PRICE |
Sell price is above the maxPrice you sent |
WRONG_SERVICE |
Unknown service code |
WRONG_COUNTRY |
Unknown country code |
EARLY_CANCEL_DENIED |
Cancel too early — wait about 2 minutes and retry |
DISABLED |
API access turned off by admin |