Dokumentasi API
API publik Dev Otps — sederhana, gratis, dan bisa dipakai siapa saja untuk integrasi.
API Key
Gunakan kunci publik berikut pada header x-api-key.
rzl_f0b970dafc9247a02306ac0a8acff18ca3a7devAlternatif: Authorization: Bearer <key> atau query ?api_key=<key>.
Base URL
https://dev-otps.lovable.appEndpoint
GET/api/public/v1/health
Cek status layanan dan latensi sumber data.
Parameter: —
GET/api/public/v1/numbers
Daftar nomor yang tersedia.
Parameter: country, search, limit (maks 200)
GET/api/public/v1/otps
OTP / SMS terbaru yang masuk.
Parameter: number, limit (maks 200)
Contoh cURL
curl "https://dev-otps.lovable.app/api/public/v1/numbers?limit=5" \
-H "x-api-key: rzl_f0b970dafc9247a02306ac0a8acff18ca3a7dev"Contoh JavaScript
const res = await fetch("https://dev-otps.lovable.app/api/public/v1/otps?limit=10", {
headers: { "x-api-key": "rzl_f0b970dafc9247a02306ac0a8acff18ca3a7dev" },
});
const { data } = await res.json();
console.log(data);Contoh Response
{
"ok": true,
"total": 128,
"count": 2,
"data": [
{ "number": "6281234567890", "country": "Indonesia", "countryCode": "62", "flag": "🇮🇩" },
{ "number": "60123456789", "country": "Malaysia", "countryCode": "60", "flag": "🇲🇾" }
]
}Error memakai format { "ok": false, "error": "invalid_api_key" } dengan status 401 / 403.
Dev Otps dibuat oleh Rizaldev — rizaldev.cloud