Base URL
https://api.nomorotp.id/
Format request: https://api.nomorotp.id/?action=<NAMA_ACTION>¶m1=value1¶m2=value2
Method GET atau POST tergantung endpoint (lihat table di setiap section). Response selalu JSON dengan field success: true/false.
Authentication
Semua endpoint butuh HTTP header X-API-Key. Ambil API key kamu di nomorotp.id/api-docs → section My API Key.
curl "https://api.nomorotp.id/?action=getBalance" \
-H "X-API-Key: YOUR_API_KEY"
Keep secret. API key = full account access. Pakai environment variable, jangan hardcode di source code publik. Regenerate key kalau leak.
Response format
Success:
{
"success": true,
"balance": 150000
}
Error:
{
"success": false,
"error": "BAD_KEY",
"message": "API key tidak valid"
}
HTTP status code juga mencerminkan error (401, 402, 403, 404, 400). Baca Error codes section untuk full list.
All endpoints (quick nav)
- Core: getBalance · getServices · getCountries · getPrices · getAvailability · getNumber · getStatus · setStatus · cancelActivation · getHistory
- Deposit: createDeposit · checkDeposit
Core endpoints
getBalance · GET
Cek sisa saldo akun.
curl "https://api.nomorotp.id/?action=getBalance" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{"success": true, "balance": 150000}
getServices · GET
List semua aplikasi yang didukung (WhatsApp, Telegram, dll).
| Param | Type | Required | Description |
|---|---|---|---|
server | string | Yes | Kode server: sh, sa, mn, plus, dll |
curl "https://api.nomorotp.id/?action=getServices&server=sh" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{
"success": true,
"services": {
"wa": {"code": "wa", "name": "WhatsApp"},
"tg": {"code": "tg", "name": "Telegram"}
}
}
getCountries · GET
List semua negara yang tersedia.
| Param | Type | Required |
|---|---|---|
server | string | Optional |
curl "https://api.nomorotp.id/?action=getCountries" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{
"success": true,
"countries": {"6": "Indonesia", "1": "USA", "44": "UK"}
}
getPrices · GET
Cek harga live per aplikasi + negara.
| Param | Type | Required |
|---|---|---|
server | string | Yes |
country | int | Optional |
service | string | Optional |
curl "https://api.nomorotp.id/?action=getPrices&server=sh&country=6&service=wa" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{
"success": true,
"prices": {"wa": {"cost": 250, "count": 48273}}
}
getAvailability · GET
Cek stok tersedia dan harga per operator.
| Param | Type | Required |
|---|---|---|
server | string | Yes |
service | string | Yes |
country | int | Yes |
curl "https://api.nomorotp.id/?action=getAvailability&server=sh&service=wa&country=6" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{
"success": true,
"availability": [{"operator": "any", "count": 48000, "cost": 250}]
}
getNumber · POST
Sewa nomor virtual baru untuk aktivasi.
| Param | Type | Required |
|---|---|---|
server | string | Yes |
service | string | Yes |
country | int | Yes |
operator | string | Optional |
curl -X POST "https://api.nomorotp.id/?action=getNumber&server=sh&service=wa&country=6" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{
"success": true,
"activation": {
"id": "ACT123",
"phone": "628123456789",
"cost": 250,
"expires_in": 1200
}
}
getStatus · GET
Cek status aktivasi + kode SMS yang sudah masuk. Poll setiap 3 detik.
| Param | Type | Required |
|---|---|---|
id | string | Yes — activation ID |
curl "https://api.nomorotp.id/?action=getStatus&id=ACT123" \
-H "X-API-Key: YOUR_API_KEY"
Response (belum ada SMS):
{"success": true, "status": "STATUS_WAIT_CODE"}
Response (SMS masuk):
{"success": true, "status": "STATUS_OK", "code": "456789"}
setStatus · POST
Update state activation (finish / retry / cancel).
| Param | Type | Required |
|---|---|---|
id | string | Yes |
status | int | Yes — 1=send, 3=retry, 6=finish, 8=cancel |
curl -X POST "https://api.nomorotp.id/?action=setStatus&id=ACT123&status=6" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{"success": true}
cancelActivation · POST
Batalkan aktivasi & refund saldo full.
curl -X POST "https://api.nomorotp.id/?action=cancelActivation&id=ACT123" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{"success": true, "refund": 250}
getHistory · GET
Riwayat aktivasi akun.
| Param | Type | Required |
|---|---|---|
limit | int | Optional (default 50, max 200) |
offset | int | Optional |
curl "https://api.nomorotp.id/?action=getHistory&limit=20" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{
"success": true,
"history": [
{"id": "ACT123", "service": "wa", "status": "finished", "code": "123456", "cost": 250}
]
}
Deposit endpoints
createDeposit · POST
Buat request top up saldo via QRIS.
| Param | Type | Required |
|---|---|---|
amount | int | Yes — nominal Rp, min 10000 |
method | string | Optional — qris (default) |
curl -X POST "https://api.nomorotp.id/?action=createDeposit&amount=10000" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{
"success": true,
"deposit": {
"id": "DEP123",
"amount": 10000,
"pay_amount": 10000,
"qr_url": "https://...",
"expires_in": 900
}
}
checkDeposit · GET
Cek status pembayaran deposit.
curl "https://api.nomorotp.id/?action=checkDeposit&id=DEP123" \
-H "X-API-Key: YOUR_API_KEY"
Response:
{"success": true, "status": "paid", "credited": 10000}
Service codes (populer)
Full list 400+ services via endpoint getServices. Yang paling populer:
| App | Code | Landing page |
|---|---|---|
wa | /otp-whatsapp | |
| Telegram | tg | /otp-telegram |
| Gojek | go | /otp-gojek |
| Shopee | ot | /otp-shopee |
| TikTok | lf | /otp-tiktok |
ig | /otp-instagram | |
fb | /otp-facebook |
Country codes (populer)
| Country | Code | Prefix |
|---|---|---|
| Indonesia | 6 | +62 |
| USA | 1 | +1 |
| UK | 44 | +44 |
| Russia | 0 | +7 |
| India | 22 | +91 |
| Philippines | 4 | +63 |
| Vietnam | 10 | +84 |
| Malaysia | 7 | +60 |
| Singapore | 196 | +65 |
Full list via endpoint getCountries.
Error codes
| Code | HTTP | Description |
|---|---|---|
NO_KEY | 401 | Header X-API-Key tidak dikirim |
BAD_KEY | 403 | API key tidak valid atau di-revoke |
NO_BALANCE | 402 | Saldo tidak cukup untuk aktivasi |
NO_NUMBERS | 404 | Tidak ada nomor tersedia untuk kombinasi service+country |
BAD_SERVICE | 400 | Kode service tidak dikenal |
BAD_COUNTRY | 400 | Kode negara tidak valid |
ACTIVATION_NOT_FOUND | 404 | ID aktivasi tidak ditemukan atau bukan milik akun |
Butuh code sample?
Lanjut ke Examples page — production-ready snippet untuk PHP, Node.js, Python.