Instant Delivery
OTPs delivered within seconds
150+ Countries
Numbers from worldwide locations
500+ Services
WhatsApp, Telegram, Instagram & more
99.9% Uptime
Enterprise-grade reliability
Quick Start
Get your first OTP in 4 simple steps
Get API Key
Sign up and copy your key
Check Balance
Verify sufficient funds
Get Number
Purchase a virtual number
Receive OTP
Poll for incoming SMS
Base URL
https://otpx.in/api/stubs/handler_api.phpCode Examples
Ready-to-use examples in popular languages
curl "https://otpx.in/api/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=wa&country=22&operator=any"import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://otpx.in/api/stubs/handler_api.php"
# Get a number for WhatsApp
response = requests.get(BASE_URL, params={
"api_key": API_KEY,
"action": "getNumber",
"service": "wa",
"country": "22",
"operator": "any"
})
print(response.text) # ACCESS_NUMBER:12345:919876543210const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://otpx.in/api/stubs/handler_api.php";
// Get a number for WhatsApp
const params = new URLSearchParams({
api_key: API_KEY,
action: "getNumber",
service: "wa",
country: "22",
operator: "any"
});
const response = await fetch(`${BASE_URL}?${params}`);
const data = await response.text();
console.log(data); // ACCESS_NUMBER:12345:919876543210<?php
$api_key = "YOUR_API_KEY";
$base_url = "https://otpx.in/api/stubs/handler_api.php";
// Get a number for WhatsApp
$params = http_build_query([
"api_key" => $api_key,
"action" => "getNumber",
"service" => "wa",
"country" => "22",
"operator" => "any"
]);
$response = file_get_contents("$base_url?$params");
echo $response; // ACCESS_NUMBER:12345:919876543210API Endpoints
Complete reference for all available endpoints
Get Balance
Check your current account balance before making purchases
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | string | getBalance | |
| api_key | string | Your API Key |
Example
GET https://otpx.in/api/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getBalance
// Response:
ACCESS_BALANCE:150.50Get Number
Purchase a virtual phone number for SMS verification
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | string | getNumber | |
| api_key | string | Your API Key | |
| service | string | Service code (e.g., wa for WhatsApp) | |
| country | number | Country code (e.g., 22 for India) | |
| operator | string | Operator code (e.g., any) |
Example
GET https://otpx.in/api/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=wa&country=22&operator=any
// Response:
ACCESS_NUMBER:12345:919876543210Get Status
Check SMS status and retrieve received OTP code
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | string | getStatus | |
| api_key | string | Your API Key | |
| id | number | Activation ID from getNumber |
Example
GET https://otpx.in/api/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getStatus&id=12345
// Response:
STATUS_OK:123456Set Status
Update activation status - cancel, complete, or request new SMS
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | string | setStatus | |
| api_key | string | Your API Key | |
| id | number | Activation ID | |
| status | number | Status code: 3 (request new SMS) or 8 (cancel) |
Example
GET https://otpx.in/api/stubs/handler_api.php?api_key=YOUR_API_KEY&action=setStatus&id=12345&status=8
// Response:
ACCESS_CANCELError Codes
Handle errors gracefully in your integration
| Code | Severity | Description |
|---|---|---|
| BAD_KEY | error | Invalid or missing API key |
| BAD_ACTION | error | Unknown action parameter |
| BAD_SERVICE | warning | Invalid service code |
| BAD_COUNTRY | warning | Invalid country code |
| NO_BALANCE | error | Insufficient account balance |
| NO_NUMBERS | warning | No numbers available for this service |
| NO_ACTIVATION | error | Invalid activation ID |
| ACCOUNT_BAN | critical | Account has been banned |
Reference Data
Countries, services, and operators available via API
Countries
Available country codes
Services
Supported platforms
Operators
Network operators
View complete reference data in the Interactive API Docs after logging in.
