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
| 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