Click Airtime

Authentication

Authenticate V2 API requests using API keys generated from the Enterprise Portal.

Authentication

The V2 API uses API key authentication. No login endpoints, no token refresh — just a single key in every request.

Getting Your API Key

  1. Log in to the Enterprise Portal
  2. Navigate to Settings → API Keys
  3. Click Generate New Key
  4. Copy the key immediately — it won't be shown again

Store your API key securely. If compromised, revoke it immediately from the Enterprise Portal and generate a new one.

Using Your API Key

Include the key as a Bearer token in the Authorization header:

curl -X GET https://api.clickairtime.com/v2/balance \
  -H "Authorization: Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
const response = await fetch('https://api.clickairtime.com/v2/balance', {
  headers: {
    'Authorization': 'Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  },
});
const data = await response.json();
import requests

response = requests.get(
    'https://api.clickairtime.com/v2/balance',
    headers={
        'Authorization': 'Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    }
)
data = response.json()
$ch = curl_init('https://api.clickairtime.com/v2/balance');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch));

Key Format

All API keys follow this format:

ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Prefix: ce_live_ (8 characters)
  • Random body: 32 characters (alphanumeric)
  • Total length: 40 characters

Key Permissions

Each API key can be scoped with specific permissions:

PermissionDescription
airtime.readRead product catalog and network info
airtime.writeCreate topup transactions
airtime.transactions.readView transaction history and status
wallets.readView wallet balances

IP Restrictions

You can restrict API keys to specific IP addresses from the Enterprise Portal for additional security.

Error Responses

Error CodeHTTP StatusDescription
INVALID_API_KEY401Key is missing, malformed, or not found
EXPIRED_API_KEY401Key has passed its expiration date
REVOKED_API_KEY401Key has been revoked from the portal
IP_NOT_ALLOWED403Request from an unauthorized IP address
INSUFFICIENT_PERMISSIONS403Key lacks required permission for this endpoint