Introduction
Our API automates receiving SMS messages. Requests use GET to the
provider base URL. LibOTP never exposes the provider
api_key to the browser.
Base URL:
https://api.smsindia.pro/stubs/handler_api.php
LibOTP billing rule
Before calling getNumber / getNumberV2,
LibOTP checks the user wallet against the admin sell price. If
balance is too low, the UI shows Insufficient balance
and the provider API is not called — protecting your API funds.
Get Balance
action=getBalance
Response: ACCESS_BALANCE:100.1234
Get Operators
action=getOperators
Returns operator map (IDs and labels).
Request a Phone Number
action=getNumber or getNumberV2 with
service, country, optional
operator (auto / cheap /
best / numeric), optional maxPrice.
Success: ACCESS_NUMBER:id:phone or JSON with
activationId, phoneNumber,
activationCost.
Get SMS
action=getStatus&id=$id
Success: STATUS_OK:123456
Change Status
action=setStatus&status=$status&id=$id
3 — request another SMS
8 — cancel activation
Prices & catalog
getPrices / getPricesV2 / getPricesV3
getCountries
getServices
Common errors
| Code |
Meaning |
BAD_KEY | Invalid API key |
NO_BALANCE | Provider balance empty |
NO_NUMBERS | No stock |
INSUFFICIENT_BALANCE | LibOTP user wallet too low (no API call) |
USER_BANNED | Account banned |