Complete reference for integrating with InstaOTP's virtual number service. Manage numbers, receive SMS, and check balances programmatically.
The InstaOTP API allows developers to programmatically access virtual phone numbers for OTP verification services. This RESTful API returns responses in plain text format for easy integration.
All API requests are made as HTTP GET requests to the base URL with required parameters. The API uses API key authentication passed as a query parameter.
Successful API responses follow a specific format with a status prefix:
ACCESS_NUMBER:12345:+1234567890 ACCESS_BALANCE:54.00 STATUS_OK:54321
Error responses typically begin with "ERROR_" or "BAD_" prefixes.
All API requests require authentication using your API key. The API key should be included as a query parameter in every request.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
String | Yes | Your unique API key for authentication |
https://instaotp.in/api/v1/handler_api.php?api_key=YOUR_API_KEY&action=getBalance
Retrieve the current balance of your InstaOTP account.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
String | Yes | Your API key |
Returns your current balance in the format: ACCESS_BALANCE:XX.XX
https://instaotp.in/api/v1/handler_api.php?api_key=abc123def456&action=getBalance
ACCESS_BALANCE:54.00
Retrieve a list of available services with their prices and availability.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
String | Yes | Your API key |
server |
String | No | Filter by server |
country |
String | No | Filter by country |
Returns a JSON object with available services and their details.
https://instaotp.in/api/v1/handler_api.php?api_key=abc123def456&action=getService&country=22
{
"1": [
{
"id": "vk",
"service": "Вконтакте/VKConnect",
"price": "3.12",
"qty": "1052",
"country": "22",
"provider": "1"
}
]
}
Request a virtual number for a specific service.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
String | Yes | Your API key |
service |
String | Yes | The service ID (e.g., "wa, tg, am") |
country |
String | Yes | The country code (e.g., "22" for India) |
server |
String | Yes | The server identifier |
Returns the order ID and phone number in the format: ACCESS_NUMBER:ORDER_ID:PHONE_NUMBER
https://instaotp.in/api/v1/handler_api.php?api_key=abc123def456&action=getNumber&service=vk&country=22&server=1
ACCESS_NUMBER:12345:+1234567890
Use this endpoint to either finish an order (mark as completed) or cancel/ban an order. The API forwards the request to the provider and maps provider messages to standardized status responses.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
String | Yes | Your API key |
id |
String | Yes | Order ID returned when the number was allocated |
status |
String | Yes | Either cancel or finish |
If status=finish the API attempts to finish the order; if status=cancel it
attempts to cancel/ban and may refund depending on provider response. Invalid or missing params will return
parameter errors.
The provider message is mapped to the following standardized responses:
ACCESS_READY — Numbers readiness confirmed.ACCESS_RETRY_GET — Waiting for a new SMS.ACCESS_ACTIVATION — The service has been successfully activated.ACCESS_CANCEL — Order cancelled / banned (or refunded) successfully.EARLY_CANCEL_DENIED — It is not allowed to ban a number within the first 2 minutes.ERROR_SQL — Database server error.NO_ACTIVATION — Order ID does not exist / activation not found.ALREADY_CANCEL — Order already banned.BAD_SERVICE — Incorrect service name.BAD_STATUS — Incorrect status value provided.BAD_KEY — Invalid API key.BAD_ACTION — Incorrect action specified.https://instaotp.in/api/v1/handler_api.php?api_key=abc123def456&action=setStatus&id=12345&status=finish
ACCESS_ACTIVATION EARLY_CANCEL_DENIED ACCESS_CANCEL ERROR_SQL NO_ACTIVATION ALREADY_CANCEL BAD_SERVICE BAD_STATUS BAD_KEY BAD_ACTION
| Code | Description |
|---|---|
NO_API_KEY |
API key is missing in the request |
BAD_KEY |
Invalid API key provided |
| Code | Description |
|---|---|
BAD_PARAMS |
Required parameters are missing |
BAD_ACTION |
Incorrect action specified |
BAD_SERVICE |
Incorrect service name provided |
BAD_STATUS |
Invalid status value provided |
INVALID_STATUS |
Status must be either 'cancel' or 'finish' |
| Code | Description |
|---|---|
NO_SERVICES |
No services available or failed to fetch services |
NO_ACTIVATION |
Activation not found or invalid order ID |
ALREADY_CANCEL |
Order has already been cancelled |
EARLY_CANCEL_DENIED |
Cannot cancel number within first 2 minutes |
ERROR_SQL |
Database server error occurred |
| Code | Description |
|---|---|
STATUS_WAIT_CODE |
Waiting for SMS code |
ACCESS_RETRY_GET |
Waiting for new SMS |
ACCESS_READY |
Numbers readiness confirmed |
ACCESS_ACTIVATION |
Service activated successfully |
ACCESS_CANCEL |
Order cancelled/banned successfully |
id: 1
Activeid: 2
Activeid: 3
Activeid: 4
Activeid: 5
Activeid: 6
Activeid: 7
Activeid: 8
Activeid: 9
Activeid: 10
Inactive