Token auth
Generate API tokens from settings and authenticate with `X-API-Key`.
Use Amigo APIs to vend data through your app, website, terminal or internal tool. Start with a developer account, generate an API token, then send clean JSON requests.
Generate API tokens from settings and authenticate with `X-API-Key`.
Lock API usage to trusted servers when you are ready for production.
Use unique keys to retry safely without accidental duplicate charges.
Fetch available plans and plan reliability before you route traffic.
Create an Amigo account, upgrade to developer in settings, generate a token, then call the data endpoint from your server.
Open API settings after login. If you are not a developer yet, tap upgrade and generate your first token.
Use the plan ID from the live catalog. Send requests from your backend, not from public frontend JavaScript.
fetch('https://amigo.ng/api/data/', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_TOKEN',
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({
network: 1,
mobile_number: '09012345678',
plan: 1001,
Ported_number: true
})
}).then(r => r.json()).then(console.log);
<?php
$ch = curl_init('https://amigo.ng/api/data/');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: YOUR_API_TOKEN',
'Content-Type: application/json',
'Idempotency-Key: '.bin2hex(random_bytes(16))
],
CURLOPT_POSTFIELDS => json_encode([
'network' => 1,
'mobile_number' => '09012345678',
'plan' => 1001,
'Ported_number' => true
])
]);
echo curl_exec($ch);
curl_close($ch);
These tables load from the same plan APIs your integration can use.
| Plan ID | Capacity | Validity | Price |
|---|
| Plan ID | Capacity | Validity | Price |
|---|
| Plan ID | Capacity | Validity | Price |
|---|
Use reliability data to pick plans that are safer for production traffic.
| Plan ID | Capacity | Efficiency |
|---|
| Plan ID | Capacity | Efficiency |
|---|
| Plan ID | Capacity | Efficiency |
|---|
The important parts of the API in one place.
All production API calls are served from this base URL.
{
"network": 1,
"mobile_number": "09012345678",
"plan": 1001,
"Ported_number": true
}
Generate and revoke tokens from API settings after logging in.
Send a unique value per intended purchase so retries do not duplicate successful charges.