Developer Portal v2.0

OTPGet API Docs –
SMS OTP, Cheap Numbers, Rental & Email

Buy virtual phone numbers for OTP verification, get cheap bulk SMS numbers for quick turnaround, rent long-term SMS numbers across 200+ countries, and get temporary Gmail addresses — all via one simple REST API.

SMS OTP API Cheap Numbers Rental Numbers Temp Email OTP 200+ Countries
Cheap Numbers API
Quick Turnaround Bulk SMS Numbers

Get temporary phone numbers in seconds for immediate SMS verification. Perfect for bulk verification, testing, or quick OTP needs. Numbers stay active for 15 minutes.

✓ Instant activation  ·  ✓ 15-minute validity  ·  ✓ Multi-server support (type=1, type=2)  ·  ✓ Full refund on cancel
Cheap Numbers API — All Endpoints

Base URL: https://www.otpget.com/stubs/cheap_handler.php

#ActionRequired ParamsDescription
1getBalanceGet wallet balance
2getServerstypeList servers (type=1 for Server 1, type=2 for Server 2)
3buyNumberserver, typeBuy a cheap number — returns ORDER_ID,NUMBER,SECS_LEFT
4getStatusidCheck for received OTP (poll every 5 seconds)
5setStatusid, statusCancel (status=8, refund) or finish (status=3)
Server Types:  type=1 = Server 1 (Server1)  |  type=2 = Server 2 (Server2)
1. Get Cheap Servers

List available cheap number servers. Use type parameter to filter (1 or 2).

https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServers&type=1
PHP
cURL
Python
$url = 'https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServers&type=1';
$servers = json_decode(file_get_contents($url), true);
foreach($servers['1'] as $server) {
  echo $server['name'] . ' (ID: ' . $server['id'] . ')' . PHP_EOL;
}
curl "https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServers&type=1"
import requests
url = "https://www.otpget.com/stubs/cheap_handler.php"
params = {"api_key": "YOUR_API_KEY", "action": "getServers", "type": "1"}
servers = requests.get(url, params=params).json()
for server in servers['1']:
  print(server['name'])
JSON RESPONSE
{
  "1": [
    {"id": "1", "name": "Pakistan Server 1"},
    {"id": "2", "name": "Pakistan Server 2"}
  ],
  "2": [
    {"id": "3", "name": "India Server"}
  ]
}
2. Buy Cheap Number

Instantly purchase a cheap number. Balance is deducted immediately. Number stays valid for 15 minutes.

https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=buyNumber&server=1&type=1
PHP
cURL
Python
$url = 'https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=buyNumber&server=1&type=1';
$response = file_get_contents($url);
list($order_id, $number, $expires) = explode(',', $response);
echo "Order: $order_id | Number: $number | Expires in: $expires seconds";
curl "https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=buyNumber&server=1&type=1"
import requests
url = "https://www.otpget.com/stubs/cheap_handler.php"
params = {"api_key": "YOUR_API_KEY", "action": "buyNumber", "server": "1", "type": "1"}
response = requests.get(url, params=params).text
order_id, number, expires = response.split(',')
print(f"Number: {number}, Expires: {expires}s")
PLAIN TEXT RESPONSE ORDER_ID_12345,+923001234567,900

Format: order_id,phone_number,seconds_until_expiry

3. Check OTP Status

Poll this endpoint every 5–10 seconds after buying a number to check if the OTP has arrived.

https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getStatus&id=ORDER_ID
PHP
cURL
Python
$url = 'https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getStatus&id=ORDER_ID';

for($i = 0; $i < 30; $i++) { // Poll for 2.5 minutes max
  $response = file_get_contents($url);
  if(strpos($response, 'STATUS_OK:') === 0) {
    $otp = substr($response, 10);
    echo "OTP: $otp";
    break;
  }
  sleep(5);
}
curl "https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getStatus&id=ORDER_ID"
import requests, time
url = "https://www.otpget.com/stubs/cheap_handler.php"

for _ in range(30): # poll for 2.5 minutes
  response = requests.get(url, params={"api_key": "YOUR_API_KEY", "action": "getStatus", "id": "ORDER_ID"}).text
  if 'STATUS_OK:' in response:
    otp = response.split(':')[1]
    print(f'OTP: {otp}')
    break
  time.sleep(5)
OTP RECEIVED STATUS_OK:847293
WAITING STATUS_WAIT_CODE
4. Cancel or Finish

Mark an order as complete or cancel it for a refund.

https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=setStatus&id=ORDER_ID&status=3
StatusMeaning
3 or 6Finish (OTP must already be received)
8Cancel & Refund (only if no OTP received yet)
PHP
cURL
Python
$url = 'https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=setStatus&id=ORDER_ID&status=3';
echo file_get_contents($url); // ACCESS_FINISH or error
curl "https://www.otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=setStatus&id=ORDER_ID&status=3"
import requests
url = "https://www.otpget.com/stubs/cheap_handler.php"
params = {"api_key": "YOUR_API_KEY", "action": "setStatus", "id": "ORDER_ID", "status": "3"}
print(requests.get(url, params=params).text) # ACCESS_FINISH

Full documentation for SMS OTP API, Rental API, and Email OTP API continues below...

Reference the complete docs.php file for all 17 endpoints