API documentation

Protocol for SMS activation. LibOTP proxies the provider server-side and bills users at admin sell prices.

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_KEYInvalid API key
NO_BALANCEProvider balance empty
NO_NUMBERSNo stock
INSUFFICIENT_BALANCELibOTP user wallet too low (no API call)
USER_BANNEDAccount banned