Selamat datang di Pusat Developer WarungNokos. Gunakan API Host-to-Host (H2H) ini untuk mengintegrasikan layanan Nomor Virtual, OTP otomatis, dan Sistem Saldo ke dalam website atau bot WhatsApp Anda secara White-Label (tanpa identitas pihak ketiga).
Base URL API Endpoint
base-url
https://warungnokos.web.id
Autentikasi (Wajib)
Seluruh endpoint API membutuhkan otorisasi. Anda WAJIB menggunakan API Key yang didapat dari halaman Profil Anda, dikirim melalui header request.
Parameter
Tipe
Lokasi
Diperlukan
Deskripsi
x-api-key
string
headers
Ya
Kunci API autentikasi (contoh: wn-123xyz...)
Users Profile & Balance
Mengambil informasi detail tentang profil akun WarungNokos Anda dan saldo terkini yang dapat digunakan untuk transaksi H2H.
GET/api/user/profile
Contoh Kode Request
profile.js
constoptions = {
method: 'GET',
url: '{{BASE}}/api/user/profile',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
constresponse = awaitaxios(options);
Success Response
profile.json
{
"success": true,
"data": {
"username": "developer_pro",
"email": "dev@mail.com",
"balance": 150000,
"referralCode": "A1B2C3"
}
}
Coba Endpoint
Live Request Tester
GET
Services Available
Daftar lengkap layanan aplikasi (WhatsApp, Telegram, dll) yang tersedia di server kami untuk keperluan OTP.
GET/api/otp/services
Contoh Kode Request
services.js
constoptions = {
method: 'GET',
url: '{{BASE}}/api/otp/services',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
constresponse = awaitaxios(options);
Success Response (V2 Format)
services.json
{
"success": true,
"data": [
{
"service_code": 14,
"service_name": "WhatsApp",
"service_img": "https://link/wa.png"
},
{
"service_code": 86,
"service_name": "Telegram",
"service_img": "https://link/tg.png"
}
]
}
Coba Endpoint
Live Request Tester
GET
Countries Available
Mengambil daftar negara beserta pricelist (harga & stok) yang tersedia secara spesifik berdasarkan ID Layanan yang dipilih.
GET/api/otp/countries/:serviceId
Parameter
Tipe
Lokasi
Diperlukan
Deskripsi
serviceId
string
URL Path
Ya
ID layanan (contoh: 14 untuk WhatsApp)
Contoh Kode Request
countries.js
constoptions = {
method: 'GET',
// Ganti :serviceId dengan ID layanan (contoh 14)
url: '{{BASE}}/api/otp/countries/:serviceId',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
constresponse = awaitaxios(options);
Success Response (V2 Format)
countries.json
{
"success": true,
"data": [
{
"number_id": 340437,
"name": "Indonesia",
"prefix": "+62",
"stock_total": 103,
"pricelist": [
{
"provider_id": "3837",
"server_id": 3,
"stock": 103,
"rate": 81.6,
"price": 1100
}
]
}
]
}
Coba Endpoint
Live Request Tester
GET
List Operator
Daftar lengkap operator seluler berdasarkan negara dan provider_id yang dipilih.