Authentication
Send your key in the X-Api-Key header. Responses are JSON with "ok": true|false. Limit: 120 requests per minute per key (HTTP 429 when exceeded). Prices are in USD and are charged from your balance.
Typical flow
- Find the service:
GET /api/v1/services?region=ID&q=telegram - Buy:
POST /api/v1/buywith{"service_id": 123}— you get the number and an order id. - Poll
GET /api/v1/order/<id>every 5–10 seconds untilotpis filled. - No code?
POST /api/v1/order/<id>/reportfor a refund review.
Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /api/v1/balance | Your balance |
| GET | /api/v1/regions | Regions (USA, UK, Canada…) |
| GET | /api/v1/services?region=&type=&q= | Services with your price and stock. type: 1 fresh, 2 recycled, 3 renewed |
| GET | /api/v1/prefixes/<service_id> | Area codes in stock |
| POST | /api/v1/buy | {"service_id", "quantity"?, "prefix"?, "expiry"?} — prefix can be "1201,1203"; expiry 0–6 |
| POST | /api/v1/buy-multi | {"service_ids": [1,2,3]} — one number for 2–5 apps (same region and type) |
| GET | /api/v1/orders?live=1 | Your orders (live ones only with live=1) |
| GET | /api/v1/order/<id> | Status, number, OTP and all SMS |
| POST | /api/v1/order/<id>/extend | Add 15 minutes (50% of price) |
| POST | /api/v1/order/<id>/reactivate | Use the same number again (40% of price) |
| POST | /api/v1/order/<id>/free-extend | Free: give a number that got no SMS a new waiting window (up to 2 times) |
| POST | /api/v1/order/<id>/renew | Keep the number longer ($1.70) |
| POST | /api/v1/order/<id>/report | Ask for a refund when no SMS came |
Code examples
cURL
curl -H "X-Api-Key: YOUR_KEY" "https://otpmango.com/api/v1/services?q=telegram"
curl -X POST -H "X-Api-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"service_id": 123}' https://otpmango.com/api/v1/buy
curl -H "X-Api-Key: YOUR_KEY" https://otpmango.com/api/v1/order/456
Python
import time, requests
API, H = "https://otpmango.com/api/v1", {"X-Api-Key": "YOUR_KEY"}
order = requests.post(f"{API}/buy", json={"service_id": 123}, headers=H).json()["orders"][0]
print("Number:", order["tel"])
while True:
o = requests.get(f"{API}/order/{order['id']}", headers=H).json()["order"]
if o["otp"]:
print("Code:", o["otp"]); break
if o["seconds_left"] == 0:
requests.post(f"{API}/order/{order['id']}/report", headers=H); break
time.sleep(6)
PHP
$ch = curl_init("https://otpmango.com/api/v1/buy");
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: YOUR_KEY", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["service_id" => 123])]);
$res = json_decode(curl_exec($ch), true);
echo $res["orders"][0]["tel"];
JavaScript
const r = await fetch("https://otpmango.com/api/v1/buy", {method: "POST",
headers: {"X-Api-Key": "YOUR_KEY", "Content-Type": "application/json"},
body: JSON.stringify({service_id: 123})});
const {orders} = await r.json();