Prepaid wallet billing. The script sends the key in a header. Responses are plain text. Same steps as the in-app API Gateway.
X-Api-Key.api_key to the URL. Opening the base URL in a browser does not call the API.getNumber. Read the OTP with getStatus. Cancel with setStatus and status=8.Generate your key after login at /app/api. Keys are never shown on this public page.
Method: GET. This is the API address. Do not open it in the
browser. A browser click has no X-Api-Key header, so the API cannot
run. Copy a curl example below and put your key in that header.
action stays in the URL. Cancel uses
action=setStatus&status=8.
Send your key in the X-Api-Key header. Query params
api_key, apiKey, and key are ignored.
Invalid key → BAD_KEY.
Returns your wallet balance in INR.
ACCESS_BALANCE:123.45
Country list uses the same numeric ids as SMS India
(22 = India, 187 = United States).
ISO codes like IN still work as aliases.
22:India 187:United States 16:United Kingdom …
Short numeric service codes (e.g. 101, 248) —
copy from the browse table. Only these codes work — old
s1_* / name aliases are rejected.
Live catalog. Left = country · Right = service with price & stock.
Updates automatically when prices or services change.
| Code | Country |
|---|---|
| Loading… | |
| Code | Name | Price ₹ | Stock |
|---|---|---|---|
| Loading… | |||
Live prices for a country — same numbers as the table above.
Plain text serviceCode:price. JSON uses cost for price and
count for stock. Default country 22.
101:16.08 248:12.50 512:24.06 …
Buy a temporary number. Debits the wallet. Each API number stays active for about 21 minutes.
| Param | Required | Notes |
|---|---|---|
service |
yes |
From getServices — short numeric code (e.g. 101).
|
country |
no | Default 22 (India). Same numeric ids as SMS India. |
operator |
no |
Optional opaque pin s1, s2, s3…
These are operators on Server 01, not a second product server.
If omitted, the API tries live operators cheapest-first.
A raw operator number is rejected (WRONG_OPERATOR).
|
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. Cancel is instant when the provider
accepts — no LibOTP wait timer. If the provider denies early cancel you get
EARLY_CANCEL_DENIED immediately (retry when ready).
| 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.
Some software shows this when the call never reaches a real API result.
The API is working when getBalance returns plain text
ACCESS_BALANCE: plus your balance.
Use only https://libotp.online/api/gateway.
The website home page is not the API. Do not paste another service provider's URL,
and do not add ?api_key= on the end.
Send the key only in the header X-Api-Key.
A missing key, a cut-off key, extra spaces, or a rotated key returns
BAD_KEY. Many apps show that as this connection error.
Create or rotate the key at /app/api.
api_key, apiKey, and key in the URL are ignored.
A browser tab does not send the header, so it cannot prove the connection.
Use country ids from getCountries, such as 22 (India) or
187 (USA). ISO aliases like IN also work.
Use service codes from getServices / the browse table
(short numbers like 101). Do not call /api/v1.
The machine running the software must be allowed to open HTTPS to
https://libotp.online on port 443.
A firewall, VPN, or host that blocks outbound HTTPS shows the same error.
If curl on your computer returns ACCESS_BALANCE: and the software does not,
the block is on the software's network.
Delete any URL saved for a previous service provider.
Paste only https://libotp.online/api/gateway.
Do not mix two provider addresses in one field.
NO_BALANCE and NO_NUMBERS are not connection errors.
| 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 |
Provider refused cancel yet — retry the same id (no LibOTP wait) |
ERROR_RATE_LIMIT:1 |
Over 100 req/s on that action group — wait 1s (HTTP 429) |
DISABLED |
API access turned off by admin |