LibOTP API Gateway

Temporary virtual SMS numbers for OTP. Prepaid wallet. India-first. Plain-text HTTP API — built so developers and AI assistants can integrate from this page alone.

For AI / ChatGPT / Cursor

Send this link to any AI to generate a working client: https://libotp.online/docs/api.md (full machine-readable Markdown).

Base URL

https://libotp.online/api/handler_api.php

Alias (same handler): https://libotp.online/stubs/handler_api.php

Method: GET · Response: plain text

Authentication

Query param api_key=YOUR_KEY (also apiKey, key, or header X-Api-Key). Create the key after login at /app/api. Invalid key → BAD_KEY.

Actions

getBalance

GET ...?api_key=YOUR_KEY&action=getBalance
→ ACCESS_BALANCE:123.45

getCountries

GET ...?api_key=YOUR_KEY&action=getCountries
→ IN:India
→ US:United States
→ …

Use codes like IN, US — never numeric ids like 22.

getServices

GET ...?api_key=YOUR_KEY&action=getServices
→ whatsapp:WhatsApp
→ telegram:Telegram
→ …

Use friendly codes only — never third-party short codes.

getNumber / getNumberV2

GET ...?api_key=YOUR_KEY&action=getNumber&service=whatsapp&country=IN
→ ACCESS_NUMBER:<activationId>:<phoneDigits>
ParamRequiredNotes
serviceyesFrom getServices
countrynoDefault IN
operatornoAuto-picked if omitted
maxPricenoINR sell cap

Errors: NO_BALANCE, NO_NUMBERS, WRONG_SERVICE, WRONG_COUNTRY.

getStatus

GET ...?api_key=YOUR_KEY&action=getStatus&id=ACTIVATION_ID
→ STATUS_WAIT_CODE
→ STATUS_OK:123456
→ STATUS_CANCEL

setStatus

GET ...?api_key=YOUR_KEY&action=setStatus&id=ACTIVATION_ID&status=8
statusMeaning
8Cancel
6Finish
3Request next SMS

Recommended flow

  1. getBalance
  2. getNumber → parse ACCESS_NUMBER:id:phone
  3. Poll getStatus every 3–5s until STATUS_OK:code
  4. Optional cancel with setStatus=8

curl

curl "https://libotp.online/api/handler_api.php?api_key=YOUR_KEY&action=getBalance"
curl "https://libotp.online/api/handler_api.php?api_key=YOUR_KEY&action=getNumber&service=whatsapp&country=IN"
curl "https://libotp.online/api/handler_api.php?api_key=YOUR_KEY&action=getStatus&id=ACTIVATION_ID"

Limits & security

Full AI copy: https://libotp.online/docs/api.md