API Reference · v1

API Reference NomorOTP.id

Complete endpoint documentation untuk NomorOTP.id API. 12 endpoint dengan REST-style query string + JSON response. Auth via X-API-Key HTTP header.

Base URL

https://api.nomorotp.id/

Format request: https://api.nomorotp.id/?action=<NAMA_ACTION>&param1=value1&param2=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 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).

ParamTypeRequiredDescription
serverstringYesKode 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.

ParamTypeRequired
serverstringOptional
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.

ParamTypeRequired
serverstringYes
countryintOptional
servicestringOptional
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.

ParamTypeRequired
serverstringYes
servicestringYes
countryintYes
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.

ParamTypeRequired
serverstringYes
servicestringYes
countryintYes
operatorstringOptional
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.

ParamTypeRequired
idstringYes — 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).

ParamTypeRequired
idstringYes
statusintYes — 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.

ParamTypeRequired
limitintOptional (default 50, max 200)
offsetintOptional
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.

ParamTypeRequired
amountintYes — nominal Rp, min 10000
methodstringOptional — 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:

AppCodeLanding page
WhatsAppwa/otp-whatsapp
Telegramtg/otp-telegram
Gojekgo/otp-gojek
Shopeeot/otp-shopee
TikToklf/otp-tiktok
Instagramig/otp-instagram
Facebookfb/otp-facebook

Country codes (populer)

CountryCodePrefix
Indonesia6+62
USA1+1
UK44+44
Russia0+7
India22+91
Philippines4+63
Vietnam10+84
Malaysia7+60
Singapore196+65

Full list via endpoint getCountries.

Error codes

CodeHTTPDescription
NO_KEY401Header X-API-Key tidak dikirim
BAD_KEY403API key tidak valid atau di-revoke
NO_BALANCE402Saldo tidak cukup untuk aktivasi
NO_NUMBERS404Tidak ada nomor tersedia untuk kombinasi service+country
BAD_SERVICE400Kode service tidak dikenal
BAD_COUNTRY400Kode negara tidak valid
ACTIVATION_NOT_FOUND404ID aktivasi tidak ditemukan atau bukan milik akun

Butuh code sample?

Lanjut ke Examples page — production-ready snippet untuk PHP, Node.js, Python.