Authentication
Authenticate with the Click Airtime V1 API using header-based email and token credentials.
Version 1 API (v1.4) — This API is in maintenance mode. New integrations should use the Version 2 API which provides API key authentication.
Overview
The V1 API uses header-based authentication. Every request must include two custom headers containing your account email and API token.
Required Headers
| Header | Description |
|---|---|
X-Click-Airtime-Email | The email address associated with your Click Airtime account |
X-Click-Airtime-Token | Your API token, e.g. C8000000-000G-4474-0001-J0000 (found in your account dashboard under Settings > API Keys) |
Getting Your Credentials
- Log in to your Click Airtime dashboard at my.clickairtime.com
- Navigate to Settings > API Keys
- Copy your API Token
- Use the email address you registered with as the email header value
Keep your token secret. Never expose your API token in client-side code, public repositories, or browser requests. Always make API calls from your server.
Code Examples
curl -X GET https://api.clickairtime.com/adp/balances \
-H "X-Click-Airtime-Email: your@email.com" \
-H "X-Click-Airtime-Token: your-api-token"const headers = {
'X-Click-Airtime-Email': 'your@email.com',
'X-Click-Airtime-Token': 'your-api-token',
};
const response = await fetch('https://api.clickairtime.com/adp/balances', {
headers,
});
const data = await response.json();
console.log(data);import requests
headers = {
'X-Click-Airtime-Email': 'your@email.com',
'X-Click-Airtime-Token': 'your-api-token',
}
response = requests.get(
'https://api.clickairtime.com/adp/balances',
headers=headers,
)
print(response.json())Authentication Errors
If your credentials are missing or invalid, the API returns a 401 Unauthorized response:
{
"message": "Invalid or missing authentication credentials",
"statusCode": 401
}
Common Issues
| Problem | Solution |
|---|---|
401 Unauthorized | Verify your email and token are correct |
| Token not working after reset | Regenerate the token in your dashboard and update your integration |
| Header names are case-sensitive | Ensure exact casing: X-Click-Airtime-Email and X-Click-Airtime-Token |
