TM
OTPGet
Developer Portal v1.0

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

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

SMS OTP API Cheap Numbers API Virtual Number Rental Temp Email OTP 50+ Countries PHP  ·  Python  ·  cURL
https://otpget.com/stubs/handler_api.php
Authentication

All requests must include your API Key in the query string.

?api_key=YOUR_API_KEY
Response Formats — Know Before You Code

The APIs use different response formats. Make sure your code handles each correctly.

SMS OTP API
handler_api.php PLAIN TEXT
ACCESS_BALANCE:500.00
ACCESS_NUMBER:abc123:9230012345
STATUS_OK:847293
STATUS_WAIT_CODE
BAD_KEY

Most actions: plain text. Exception: getCountries + getServices return JSON.

Cheap Numbers API
cheap_handler.php PLAIN TEXT + JSON
ACCESS_BALANCE:500.00
ORD_abc,923001234,900
STATUS_OK:847293
STATUS_WAIT_CODE
LOW_BALANCE

Most actions: plain text. getServers + getServices return JSON.

Rental API
rental-handler.php JSON
{"status": "200",
 "message": "...",
 ... data fields}

Check status === "200" for success.

Email OTP API
email_handler.php JSON
{"status": "200",
 "message": "...",
 ... data fields}

202 = waiting. 300 = cancelled.

SMS OTP API — Endpoints

Base URL: https://otpget.com/stubs/handler_api.php

#ActionKey ParamsDescription
1getBalanceGet wallet balance
2getCountriestypeList countries by provider (1–6)
3getServicescountry, typeList services for a country
4getNumberservice, country, typeBuy a virtual number for OTP
5getStatusidPoll for received SMS code
6setStatusid, statusComplete (3/6) or cancel & refund (8 — after 2 min)
1. Get Balance

Check your account balance in PKR. Returns plain text: ACCESS_BALANCE:500.00

https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getBalance
PHP
cURL
Python
$url = 'https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getBalance';
echo file_get_contents($url);
curl "https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getBalance"
import requests
url = "https://otpget.com/stubs/handler_api.php"
params = {"api_key": "YOUR_API_KEY", "action": "getBalance"}
print(requests.get(url, params=params).text)
PLAIN TEXT RESPONSE
ACCESS_BALANCE:500.00
2. Get Countries

List all available countries. You can filter by provider type (1, 2, 3, 4, 5 or 6).

https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getCountries&type=1
PHP
cURL
Python
$url = 'https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getCountries&type=1';
echo file_get_contents($url);
curl "https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getCountries&type=1"
import requests
url = "https://otpget.com/stubs/handler_api.php"
params = {"api_key": "YOUR_API_KEY", "action": "getCountries", "type": "1"}
print(requests.get(url, params=params).text)
JSON RESPONSE
{"1": [
  {"id": "33", "name": "Canada"},
  {"id": "15", "name": "England"},
  {"id": "61", "name": "Pakistan"},
  {"id": "12", "name": "USA"},
  ... 30+ more countries
],
"2": [ ... Provider 2 ... ]}
3. Get Services

Get available services for a specific country and provider.

https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getServices&country=61&type=1
PHP
cURL
Python
$url = 'https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getServices&country=61&type=1';
echo file_get_contents($url);
curl "https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getServices&country=61&type=1"
import requests
url = "https://otpget.com/stubs/handler_api.php"
params = {"api_key": "YOUR_API_KEY", "action": "getServices", "country": "61", "type": "1"}
print(requests.get(url, params=params).text)
JSON RESPONSE
{"101": "Telegram - 45 PKR",
"102": "WhatsApp - 60 PKR",
"103": "Instagram - 55 PKR"}
4. Request Number

Order a new phone number to receive SMS. This will deduct PKR from your balance.

https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=101&country=61&type=1
ParameterTypeDescription
servicestringNumeric DB ID from getServices e.g. 101, 102
countryintCountry ID from getCountries — e.g. 61 (Pakistan), 12 (USA)
typeintProvider (1–6)
PHP
cURL
Python
$url = 'https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=101&country=61&type=1';
echo file_get_contents($url);
curl "https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=101&country=61&type=1"
import requests
url = "https://otpget.com/stubs/handler_api.php"
params = {"api_key": "YOUR_API_KEY", "action": "getNumber", "service": "101", "country": "61", "type": "1"}
print(requests.get(url, params=params).text)
PLAIN TEXT — SUCCESS ACCESS_NUMBER:order_id:phone_number
5. Get Activation Status

Check if an SMS has been received for an order ID.

https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getStatus&id=abc123xyz
PHP
cURL
Python
$url = 'https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getStatus&id=abc123xyz';
echo file_get_contents($url);
curl "https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getStatus&id=abc123xyz"
import requests
url = "https://otpget.com/stubs/handler_api.php"
params = {"api_key": "YOUR_API_KEY", "action": "getStatus", "id": "abc123xyz"}
print(requests.get(url, params=params).text)
WAITING STATUS_WAIT_CODE
RECEIVED STATUS_OK:$code
6. Set Activation Status

Complete a successful activation (status 3 or 6 — OTP must already be received), or cancel for a refund (status 8 — only after 2 minutes, no OTP received).

https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=setStatus&id=abc123xyz&status=8
PHP
cURL
Python
$url = 'https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=setStatus&id=abc123xyz&status=8';
echo file_get_contents($url);
curl "https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=setStatus&id=abc123xyz&status=8"
import requests
url = "https://otpget.com/stubs/handler_api.php"
params = {"api_key": "YOUR_API_KEY", "action": "setStatus", "id": "abc123xyz", "status": "8"}
print(requests.get(url, params=params).text)
Status CodeMeaning
3Complete Activation (OTP must already be received)
6Complete Activation (OTP must already be received)
8Cancel and Refund — only allowed after 2 minutes from purchase, no SMS received yet
COMPLETE (3 or 6)
ACCESS_FINISH
CANCEL & REFUND (8)
ACCESS_READY

Balance refunded

BLOCKED
EARLY_CANCEL_DENIED
NO_SMS_RECEIVED
STATUS_ALREADY_CHANGED
Rental Number API — All Endpoints

Base URL: https://otpget.com/stubs/rental-handler.php

#ActionRequired ParamsDescription
1getRentalCountries (optional: provider)List all countries available for rental
2getRentalPricingcountry_code, providerGet pricing tiers for a country
3getAvailableRentalscountry_code, providerLive stock availability check
4rentNumbercountry_code, provider, duration_hoursBuy a rental number
5getMyRentalsList all your rentals
6getRentalSMSorder_idFetch SMS messages on a rented number
7renewRentalrental_id, duration_hoursExtend rental period
Provider values:  provider=1 = Server 1  |  provider=2 = Server 2
duration_hours: 12 · 24 · 168 · 720 · 4320 · 8640
1. Get Rental Countries

List all countries available for rental. Filter by provider or omit to get all servers.

https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalCountries&provider=2
PHP
cURL
Python
$url = 'https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalCountries&provider=2';
$data = json_decode(file_get_contents($url), true);
foreach($data['countries'] as $c) { echo $c['name'] . ' (' . $c['country_code'] . ')' . PHP_EOL; }
curl "https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalCountries&provider=2"
import requests
r = requests.get("https://otpget.com/stubs/rental-handler.php", params={"api_key":"YOUR_API_KEY","action":"getRentalCountries","provider":"2"})
for c in r.json()['countries']: print(c['name'], c['country_code'])
JSON RESPONSE
{"status":"200","countries":[
  {"id":"1","provider":"2","name":"Canada","country_code":"ca"},
  {"id":"6","provider":"2","name":"United States of America","country_code":"us"}
]}
2. Get Rental Pricing

Get all available pricing tiers for a country.

https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalPricing&country_code=ca&provider=2
PHP
cURL
Python
$url = 'https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalPricing&country_code=ca&provider=2';
$data = json_decode(file_get_contents($url), true);
foreach($data['pricing'] as $p) { echo $p['duration_hours'] . 'h — ' . $p['price'] . ' PKR' . PHP_EOL; }
curl "https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalPricing&country_code=ca&provider=2"
import requests
r = requests.get("https://otpget.com/stubs/rental-handler.php", params={"api_key":"YOUR_API_KEY","action":"getRentalPricing","country_code":"ca","provider":"2"})
for p in r.json()['pricing']: print(p['duration_hours']+'h —', p['price'], 'PKR')
JSON RESPONSE
{"status":"200","pricing":[
  {"id":"1","duration_hours":"720","price":"840.00","country_name":"Canada"},
  {"id":"2","duration_hours":"4320","price":"5040.00","country_name":"Canada"}
]}
3. Check Availability

Check live stock availability for a country before buying.

https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getAvailableRentals&country_code=ca&provider=2
PHP
cURL
Python
$url = 'https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getAvailableRentals&country_code=ca&provider=2';
$data = json_decode(file_get_contents($url), true);
foreach($data['available'] as $a) { echo $a['area_title'] . ': ' . $a['available'] . ' numbers' . PHP_EOL; }
curl "https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getAvailableRentals&country_code=ca&provider=2"
import requests
r = requests.get("https://otpget.com/stubs/rental-handler.php", params={"api_key":"YOUR_API_KEY","action":"getAvailableRentals","country_code":"ca","provider":"2"})
for a in r.json()['available']: print(a['area_title'], a['available'], 'available')
JSON RESPONSE
{"status":"200","available":[
  {"area_code":"ca","area_title":"Canada","available":3338,"min_month":1}
]}
4. Rent a Number

Purchase a phone number for rental. Check getRentalPricing first to confirm valid duration_hours.

https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=rentNumber&country_code=ca&provider=2&duration_hours=720
PHP
cURL
Python
$url = 'https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=rentNumber&country_code=ca&provider=2&duration_hours=720';
$data = json_decode(file_get_contents($url), true);
if($data['status'] == '200') {
  echo 'Phone: ' . $data['phone'] . PHP_EOL;
  echo 'Order ID: ' . $data['order_id'] . PHP_EOL;
}
curl "https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=rentNumber&country_code=ca&provider=2&duration_hours=720"
import requests
r = requests.get("https://otpget.com/stubs/rental-handler.php", params={"api_key":"YOUR_API_KEY","action":"rentNumber","country_code":"ca","provider":"2","duration_hours":"720"})
d = r.json()
if d['status'] == '200': print('Phone:', d['phone'])
SUCCESS RESPONSE
{"status":"200","message":"Number rented successfully",
 "phone":"3434337545","order_id":"2673093356180000583",
 "duration_hours":720,"price_paid":"840.00","new_balance":"4220.00",
 "expires":"2026-04-09 21:55:55"}
5. Get My Rentals

List all your rented numbers. Use order_id to fetch SMS. Use id to renew.

https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getMyRentals
PHP
cURL
Python
$url = 'https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getMyRentals';
$data = json_decode(file_get_contents($url), true);
foreach($data['rentals'] as $r) { echo $r['phone_number'] . ' | ' . $r['status'] . PHP_EOL; }
curl "https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getMyRentals"
import requests
r = requests.get("https://otpget.com/stubs/rental-handler.php", params={"api_key":"YOUR_API_KEY","action":"getMyRentals"})
for rental in r.json()['rentals']: print(rental['phone_number'], rental['status'])
JSON RESPONSE
{"status":"200","total":5,"rentals":[{
 "id":"27","server":"Server 2","phone_number":"3434337545",
 "order_id":"2673093356180000583","status":"active",
 "country_code":"ca","expiry_time":"2026-04-09 21:55:55"
}]}
6. Get Rental SMS

Fetch all SMS messages received on a rented number. Use order_id from rentNumber or getMyRentals.

https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalSMS&order_id=2673093356180000583
PHP
cURL
Python
$url = 'https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalSMS&order_id=2673093356180000583';
$data = json_decode(file_get_contents($url), true);
foreach($data['messages'] as $msg) { echo 'Code: ' . $msg['code'] . ' | Text: ' . $msg['text'] . PHP_EOL; }
curl "https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalSMS&order_id=2673093356180000583"
import requests
r = requests.get("https://otpget.com/stubs/rental-handler.php", params={"api_key":"YOUR_API_KEY","action":"getRentalSMS","order_id":"2673093356180000583"})
for msg in r.json()['messages']: print('Code:', msg['code'])
JSON RESPONSE
{"status":"200","phone_number":"5812822291","total":1,"messages":[{
 "from":"Server 2","text":"Your WhatsApp code 740-279","code":"","timestamp":"2026-03-09T20:57:32Z"
}]}
7. Renew Rental

Extend the rental period on an active number. Use id from getMyRentals as rental_id.

https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=renewRental&rental_id=5&duration_hours=720
PHP
cURL
Python
$url = 'https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=renewRental&rental_id=5&duration_hours=720';
$data = json_decode(file_get_contents($url), true);
if($data['status'] == '200') { echo 'New expiry: ' . $data['new_expiry'] . PHP_EOL; }
curl "https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=renewRental&rental_id=5&duration_hours=720"
import requests
r = requests.get("https://otpget.com/stubs/rental-handler.php", params={"api_key":"YOUR_API_KEY","action":"renewRental","rental_id":"5","duration_hours":"720"})
d = r.json()
if d['status'] == '200': print('New expiry:', d['new_expiry'])
SUCCESS RESPONSE
{"status":"200","message":"Renewed successfully","rental_id":27,
 "phone_number":"3434337545","duration_hours":720,
 "price_paid":"840.00","new_balance":"3440.00","new_expiry":"2026-05-09 21:55:55"}
Cheap Numbers API
Ultra-Fast Cheap OTP Numbers — 15 Min Validity

Buy cheap phone numbers instantly for OTP verification. Numbers are valid for 15 minutes with 100% refund on cancel. All cheap number endpoints use the base URL below.

https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=ACTION_NAME
Response Format: Most actions return plain text. getServers and getServices return JSON.
Cheap Numbers API — All Endpoints

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

#ActionKey ParamsDescription
1getBalanceGet wallet balance (PKR)
2getServerstypeList available cheap number servers (type=1 for Server1)
3getServicesserver, typeGet services & prices for a server
4buyNumberserver, typeBuy a cheap number — deducts PKR balance
5getStatusidPoll for received OTP on a cheap order
6setStatusid, statusCancel & refund (8) after 2 min, or complete (3/6)
server param:  Numeric ID from getServers e.g. server=1
type param:  type=1 = Server 1 (currently supported)
1. Get Balance

Check your PKR wallet balance. Returns plain text: ACCESS_BALANCE:500.00

https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getBalance
PHP
cURL
Python
$url = 'https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getBalance';
echo file_get_contents($url);
curl "https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getBalance"
import requests
r = requests.get("https://otpget.com/stubs/cheap_handler.php", params={"api_key":"YOUR_API_KEY","action":"getBalance"})
print(r.text)
PLAIN TEXT RESPONSE
ACCESS_BALANCE:500.00
2. Get Servers

List all available cheap number servers. Use the returned id as the server param in subsequent calls.

https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServers&type=1
ParameterRequiredDescription
typeOptional1 = Server 1. Omit to get all Servers.
PHP
cURL
Python
$url = 'https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServers&type=1';
$data = json_decode(file_get_contents($url), true);
foreach($data['1'] as $server) {
  echo $server['id'] . ' — ' . $server['name'] . PHP_EOL;
}
curl "https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServers&type=1"
import requests
r = requests.get("https://otpget.com/stubs/cheap_handler.php", params={"api_key":"YOUR_API_KEY","action":"getServers","type":"1"})
for s in r.json().get("1", []): print(s['id'], '—', s['name'])
JSON RESPONSE
{"1": [
  {"id": "1", "name": "Random Facebook - Free"},
  {"id": "2", "name": "Pakistan - Server 2"}
]}
3. Get Services

Get services and pricing for a specific server. Returns JSON with service name and price in PKR (₨).

https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServices&server=1&type=1
ParameterRequiredDescription
serverRequiredServer ID from getServers e.g. 1
typeRequired1 = Server 1
PHP
cURL
Python
$url = 'https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServices&server=1&type=1';
$data = json_decode(file_get_contents($url), true);
foreach($data as $id => $label) { echo $id . ': ' . $label . PHP_EOL; }
curl "https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getServices&server=1&type=1"
import requests
r = requests.get("https://otpget.com/stubs/cheap_handler.php", params={"api_key":"YOUR_API_KEY","action":"getServices","server":"1","type":"1"})
for id, label in r.json().items(): print(id, ':', label)
JSON RESPONSE
{"1": "Random Facebook - Free — ₨0.00",
"2": "Pakistan Server 2 — ₨50.00"}
4. Buy Number

Purchase a cheap phone number. Balance is deducted in PKR. The number is valid for 15 minutes. Returns order_id,number,expires_in as plain text.

https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=buyNumber&server=1&type=1
ParameterRequiredDescription
serverRequiredServer ID from getServers e.g. 1
typeRequired1 = Server 1
PHP
cURL
Python
$url = 'https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=buyNumber&server=1&type=1';
$res = file_get_contents($url);
// Success format: "ORDER_ID,PHONE_NUMBER,900"
if(strpos($res, ',') !== false) {
  [$order_id, $number, $expires] = explode(',', trim($res));
  echo 'Number: +' . $number . PHP_EOL;
  echo 'Order ID: ' . $order_id . PHP_EOL;
  echo 'Valid for: ' . ($expires/60) . ' minutes' . PHP_EOL;
} else {
  echo 'Error: ' . $res;
}
curl "https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=buyNumber&server=1&type=1"
import requests
r = requests.get("https://otpget.com/stubs/cheap_handler.php", params={"api_key":"YOUR_API_KEY","action":"buyNumber","server":"1","type":"1"})
res = r.text.strip()
if ',' in res:
  order_id, number, expires = res.split(',')
  print('Number: +' + number)
  print('Order ID:', order_id)
else:
  print('Error:', res)
SUCCESS — PLAIN TEXT
ORD_6830abc123_741,923001234567,900
# format: order_id,number,expires_in_seconds
ERROR — PLAIN TEXT
LOW_BALANCE
NO_NUMBERS
BAD_SERVER
BAD_KEY
Important: Save the order_id — you'll need it for getStatus and setStatus. Number expires in 15 minutes (900 seconds).
5. Get Status (Poll OTP)

Poll every 5–10 seconds after buying to check if an OTP has been received. Use the order_id from buyNumber as the id param.

https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getStatus&id=ORD_6830abc123_741
ParameterRequiredDescription
idRequiredThe order_id returned from buyNumber
PHP
cURL
Python
$order_id = 'ORD_6830abc123_741';
$url = "https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getStatus&id=$order_id";
// Poll every 5 seconds
for($i = 0; $i < 30; $i++) {
  $res = file_get_contents($url);
  if(strpos($res, 'STATUS_OK:') === 0) {
    $otp = explode(':', $res)[1];
    echo 'OTP: ' . $otp; break;
  } elseif($res === 'STATUS_CANCEL') {
    echo 'Expired or cancelled'; break;
  }
  sleep(5);
}
curl "https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=getStatus&id=ORD_6830abc123_741"
import requests, time
params = {"api_key":"YOUR_API_KEY","action":"getStatus","id":"ORD_6830abc123_741"}
for _ in range(30):
  res = requests.get("https://otpget.com/stubs/cheap_handler.php", params=params).text.strip()
  if res.startswith('STATUS_OK:'): print('OTP:', res.split(':')[1]); break
  elif res == 'STATUS_CANCEL': print('Expired'); break
  time.sleep(5)
OTP RECEIVED
STATUS_OK:847293
STILL WAITING
STATUS_WAIT_CODE
EXPIRED/CANCELLED
STATUS_CANCEL
6. Set Status (Cancel / Complete)

Complete a successful activation or cancel for a refund. Cancel (status=8) is only allowed after 2 minutes from purchase and only if no OTP was received.

https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=setStatus&id=ORD_6830abc123_741&status=8
ParameterRequiredDescription
idRequiredThe order_id from buyNumber
statusRequired8 = Cancel & refund  |  3 or 6 = Complete (OTP must be received)
PHP
cURL
Python
// Cancel and refund (status=8)
$url = 'https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=setStatus&id=ORD_6830abc123_741&status=8';
$res = file_get_contents($url);
// ACCESS_READY = cancelled + refunded
// ACCESS_FINISH = completed successfully
// EARLY_CANCEL_DENIED = less than 2 min since purchase
echo $res;
# Cancel
curl "https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=setStatus&id=ORD_6830abc123_741&status=8"

# Complete
curl "https://otpget.com/stubs/cheap_handler.php?api_key=YOUR_API_KEY&action=setStatus&id=ORD_6830abc123_741&status=6"
import requests
params = {"api_key":"YOUR_API_KEY","action":"setStatus","id":"ORD_6830abc123_741","status":"8"}
r = requests.get("https://otpget.com/stubs/cheap_handler.php", params=params)
print(r.text) # ACCESS_READY = cancelled & refunded
CANCELLED (8)
ACCESS_READY
PKR refunded to wallet
COMPLETED (3/6)
ACCESS_FINISH
ERRORS
EARLY_CANCEL_DENIED
NO_SMS_RECEIVED
BAD_ID
Status CodeMeaningCondition
8Cancel & RefundOnly after 2 min from purchase, no OTP received yet
3Complete ActivationOTP must already be received
6Complete ActivationSame as status 3 — alternative code
Email Services
Temporary Email OTP API — 2 Servers

Buy temporary email addresses from Server 1 (specific services like Gmail OTP for Instagram, Telegram etc.) or Server 2 (multiple email domains — gmail.com, mail.com, gmx.com and more). Add server=1 or server=2 to all requests.

https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=ACTION_NAME&server=1
server=1 — Service-based (Instagram, Telegram etc.) server=2 — Domain-based (gmail.com, mail.com, gmx.com etc.)
13. Get Email Services / Domains

Server 1: returns available services (Instagram, Telegram etc.) for a domain. Server 2: returns available email domains with prices.

Server 1 — Get Services
https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailServices&server=1&domain=gmail.com
PHP
cURL
Python
$url = 'https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailServices&server=1&domain=gmail.com';
$data = json_decode(file_get_contents($url), true);
foreach($data['services'] as $svc) { echo $svc['service_name'] . ' — ' . $svc['price'] . PHP_EOL; }
curl "https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailServices&server=1&domain=gmail.com"
import requests
r = requests.get("https://otpget.com/stubs/email_handler.php", params={"api_key":"YOUR_API_KEY","action":"getEmailServices","server":"1","domain":"gmail.com"})
for svc in r.json()['services']: print(svc['service_name'], svc['price'])
SERVER 1 JSON RESPONSE
{"status":"200","server":1,"count":65,"services":[
  {"service_code":"ig","service_name":"Instagram","price":120.00,"count":48},
  {"service_code":"tg","service_name":"Telegram","price":95.00,"count":120}
]}
Server 1 — All Service Codes (93 services)
service_idServiceservice_idServiceservice_idService
oiTinderigInstagramtgTelegram
fbFacebooktwTwittervkVK / Mail.ru
mmMicrosoftamAmazonwcCraigslist
lfTikTokkaShopeedsDiscord
wbWeChatbiglBiglionsnOLX
hbTwitchxdTokopediayaYandex
wxApplekcVintedfuSnapchat
vzHingedrOpenAI / ChatGPTdoLeboncoin
cnFiverryiYemeksepetirrWolt
xyDepopvdBetfairusIRCTC
seFeeldfkBLIBLIcwPaddyPower
bnAlfagifteeTwilioprTrendyol
gxHepsiburadalcSubitoebay_klKleinanzeigen
otAny OtherwrWalmartaczClaude AI
abdBebooahbUbisoftambVercel
nuumNuum.rudnsDNSaosLoloo
olxkzOLX KazakhstanolxuaOLX UkraineolxplOLX Poland
talkTalkatoneetsyEtsyolxroOLX Romania
olxbgOLX BulgariaolxptOLX PortugalgitGitHub
olxuzOLX UzbekistanfbbFacebook BusinessslsStreamlabs
unsUnstopswlSwarailtumTumblr
audAudiblerapRapidAPIserSerpAPI
bolBosslikefmcFMCPayawvWallapop
mmlMMLivebnlRedditsklsSkills
crsrCursorawsAmazon AWSavkQuoka
fpx500pxqqlQQLiveclgClubgg
plaPolloAItlnTolunakckKick
bbfNeosurfklbKolotibablorchResearch 360
wmbWambatnxTelnyxgrkGrok
yabBrevistaydgoDigitalOceannneOneOne
ttnTextnowbflBlack Forest LabsktKakaoTalk
Server 2 — Get Domains
https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailServices&server=2&site=telegram.com
PHP
cURL
Python
$url = 'https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailServices&server=2&site=telegram.com';
$data = json_decode(file_get_contents($url), true);
foreach($data['domains'] as $d) { echo $d['domain'] . ' — ' . $d['price'] . ' PKR (' . $d['count'] . ' available)' . PHP_EOL; }
curl "https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailServices&server=2&site=telegram.com"
import requests
r = requests.get("https://otpget.com/stubs/email_handler.php", params={"api_key":"YOUR_API_KEY","action":"getEmailServices","server":"2","site":"telegram.com"})
for d in r.json()['domains']: print(d['domain'], d['price'], 'PKR')
SERVER 2 JSON RESPONSE
{"status":"200","server":2,"count":5,"domains":[
  {"domain":"gmail.com","price":15.60,"count":82000},
  {"domain":"mail.com","price":1.17,"count":990125},
  {"domain":"gmx.com","price":1.17,"count":1615245}
]}
14. Buy Email

Purchase a temporary email address. Server 1 requires service_id + domain. Server 2 requires domain + site.

Server 1 — Buy by Service
https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=buyEmail&server=1&service_id=ig&domain=gmail.com
PHP
cURL
Python
$url = 'https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=buyEmail&server=1&service_id=ig&domain=gmail.com';
$data = json_decode(file_get_contents($url), true);
if($data['status'] == '200') { echo 'Email: ' . $data['email'] . ' | ID: ' . $data['email_id']; }
curl "https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=buyEmail&server=1&service_id=ig&domain=gmail.com"
import requests
r = requests.get("https://otpget.com/stubs/email_handler.php", params={"api_key":"YOUR_API_KEY","action":"buyEmail","server":"1","service_id":"ig","domain":"gmail.com"})
d = r.json()
if d['status'] == '200': print('Email:', d['email'], 'ID:', d['email_id'])
SERVER 1 RESPONSE
{"status":"200","message":"Email activated successfully",
 "email_id":"7291834","email":"temp.abc123@gmail.com",
 "service":"Instagram","domain":"gmail.com","price":120.00,"balance":4880.00,"server":1}
Server 2 — Buy by Domain
https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=buyEmail&server=2&domain=gmail.com&site=telegram.com
PHP
cURL
Python
$url = 'https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=buyEmail&server=2&domain=gmail.com&site=telegram.com';
$data = json_decode(file_get_contents($url), true);
if($data['status'] == '200') { echo 'Email: ' . $data['email'] . ' | ID: ' . $data['email_id']; }
curl "https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=buyEmail&server=2&domain=gmail.com&site=telegram.com"
import requests
r = requests.get("https://otpget.com/stubs/email_handler.php", params={"api_key":"YOUR_API_KEY","action":"buyEmail","server":"2","domain":"gmail.com","site":"telegram.com"})
d = r.json()
if d['status'] == '200': print('Email:', d['email'], 'ID:', d['email_id'])
SERVER 2 RESPONSE
{"status":"200","message":"Email activated successfully",
 "email_id":"48291034","email":"cudaqibeve@gmx.com",
 "service":"Email Activation","domain":"gmx.com","price":1.17,"balance":1739.25,"server":2}
ParameterServer 1Server 2
server12
service_idRequired (e.g. ig, tg)Not used
domainOptional (default: gmail.com)Required (e.g. gmail.com, mail.com)
siteNot usedOptional — website you want to register on (e.g. telegram.com)
15. Get Email Code (OTP)

Poll this endpoint after buying an email to retrieve the verification code. Call every 5–10 seconds until code arrives.

https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailCode&email_id=7291834
PHP
cURL
Python
$url = 'https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailCode&email_id=7291834';
for($i=0; $i<24; $i++) {
  $data = json_decode(file_get_contents($url), true);
  if($data['status']=='200' && !empty($data['messages'])) { echo 'OTP: ' . $data['messages'][0]['code']; break; }
  sleep(5);
}
curl "https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailCode&email_id=7291834"
import requests, time
params = {"api_key":"YOUR_API_KEY","action":"getEmailCode","email_id":"7291834"}
for _ in range(24):
  d = requests.get("https://otpget.com/stubs/email_handler.php", params=params).json()
  if d['status']=='200' and d.get('messages'): print('OTP:', d['messages'][0]['code']); break
  time.sleep(5)
200 Code received  |  202 Still waiting — keep polling  |  300 Cancelled
16. Cancel Email

Cancel an email activation. If OTP already received → returns code. If still waiting → cancels and refunds.

https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=cancelEmail&email_id=7291834
PHP
cURL
Python
$url = 'https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=cancelEmail&email_id=7291834';
$data = json_decode(file_get_contents($url), true);
echo $data['message'];
curl "https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=cancelEmail&email_id=7291834"
import requests
r = requests.get("https://otpget.com/stubs/email_handler.php", params={"api_key":"YOUR_API_KEY","action":"cancelEmail","email_id":"7291834"})
print(r.json()['message'])
17. Get Email History

Retrieve your past email purchases. Supports pagination (20 records per page).

https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailHistory&page=1
PHP
cURL
Python
$url = 'https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailHistory&page=1';
$data = json_decode(file_get_contents($url), true);
foreach($data['history'] as $h) { echo $h['email_address'] . ' | ' . $h['status'] . PHP_EOL; }
curl "https://otpget.com/stubs/email_handler.php?api_key=YOUR_API_KEY&action=getEmailHistory&page=1"
import requests
r = requests.get("https://otpget.com/stubs/email_handler.php", params={"api_key":"YOUR_API_KEY","action":"getEmailHistory","page":"1"})
for h in r.json()['history']: print(h['email_address'], h['status'])
Email OTP API — Endpoints

Base URL: https://otpget.com/stubs/email_handler.php

Add server=1 (default) for Server 1 or server=2 for Server 2 to all requests.
#ActionKey ParamsDescription
13getEmailServicesserver, domain (s1), site (s2)Server 1: list services. Server 2: list available domains
14buyEmailserver, service_id+domain (s1) or domain+site (s2)Buy temp email — returns email_id
15getEmailCodeemail_id, serverPoll for OTP (200=got it, 202=waiting, 300=cancelled)
16cancelEmailemail_id, serverCancel & refund if no OTP; complete if OTP received
17getEmailHistorypagePaginated purchase history (includes server field)

Error Codes

All APIs return consistent responses. Use the status field (JSON APIs) or the response string (plain text APIs) to detect errors.

SMS OTP API  /stubs/handler_api.php
ResponseWhen it happens
BAD_KEYAPI key missing, invalid or blocked account
ACCOUNT_BLOCKEDAccount suspended by admin
BAD_ACTIONUnknown action parameter
BAD_SERVICEService code not found for given country/type
BAD_COUNTRYCountry ID not found or missing
BAD_TYPEProvider type must be 1–6
BAD_IDOrder ID missing on getStatus/setStatus
BAD_STATUSStatus value not 3, 6 or 8
NO_BALANCEInsufficient wallet balance
NO_ACTIVATIONOrder ID not found or doesn't belong to you
STATUS_WAIT_CODESMS not received yet — keep polling
STATUS_OK:CODESMS received — code after the colon
STATUS_CANCELActivation cancelled — no SMS available
STATUS_ALREADY_CHANGEDsetStatus already called for this order
EARLY_CANCEL_DENIEDCancel attempted within first 2 minutes
NO_SMS_RECEIVEDTried to complete (3/6) but no OTP yet
ERROR_PRICE_CHANGEProvider price exceeded your balance — auto-cancelled
ERROR_PROVIDER_1..6Upstream provider error — raw response appended after colon
Cheap Numbers API  /stubs/cheap_handler.php
ResponseWhen it happens
BAD_KEYAPI key missing or invalid
ACCOUNT_BLOCKEDAccount suspended by admin
BAD_ACTIONUnknown action parameter
BAD_SERVERServer ID missing, not found or inactive
BAD_TYPEType value not 1 or 2
BAD_IDOrder ID missing on getStatus/setStatus
BAD_STATUSStatus not 3, 6 or 8
LOW_BALANCEInsufficient PKR balance to buy number
NO_NUMBERSProvider has no numbers available right now
NO_SERVERSNo active servers found for given type
NO_SERVICESNo services found for given server/type
NO_ACTIVATIONOrder ID not found or doesn't belong to you
DATABASE_ERRORDB insert failed — balance was not deducted
STATUS_WAIT_CODEOTP not received yet — keep polling
STATUS_OK:OTPOTP received — code after the colon
STATUS_CANCELNumber expired or was cancelled
ACCESS_READYCancelled successfully — balance refunded
ACCESS_FINISHActivation completed successfully
EARLY_CANCEL_DENIEDCancel attempted within first 2 minutes
NO_SMS_RECEIVEDTried to complete (3/6) but no OTP yet
Rental Number API  /stubs/rental-handler.php
statusmessageWhen it happens
401Invalid API key.Invalid or missing API key
403Account is blocked or inactive.Account suspended
400Unknown action: …Unrecognized action value
400country_code / provider / duration_hours is required.Missing required params
400Server 2 only supports monthly durations…Server 2: only 720, 4320, 8640 accepted
402Insufficient balance.Balance too low
404No pricing found…No pricing for that country/provider/duration
404Rental not found or does not belong to you.Wrong rental_id on renewRental
503Server 1/2 is currently unavailable.Provider disabled by admin
502Server 1/2 error: …Upstream provider error
500Database error: …DB transaction failed — balance not deducted
Email OTP API  /stubs/email_handler.php
statusmessageWhen it happens
401BAD_KEYInvalid or missing API key
403ACCOUNT_BLOCKEDAccount suspended by admin
400BAD_ACTION / service_id/email_id is requiredMissing params or unknown action
402Insufficient balance. Need: X — Have: YBalance too low
404Service not available / No stock available / Email activation not foundService issue or wrong email_id
500API connection error / No email available / Database errorProvider or DB failure
503Email service not configured / disabledAdmin config issue
200Success on all actions
202Waiting for code...getEmailCode: OTP not arrived yet — keep polling
300CancelledActivation was cancelled