Airtime VTU, Share & Sell
Data Gifting, SME, Transfer, Corporate, Talk More
Transaction
Webhooks
MTN Token
post
/mtn-token
Generate an MTN access token for the given MTN phone number. The token is returned as-is from MTN in the data field.
Each successful token generation is charged to your wallet at the charge amount configured for your account.
Each successful token generation is charged to your wallet at the charge amount configured for your account.
Billing
The charge amount configured for your account is debited from your wallet for every token generated. If the wallet balance is insufficient, the request is refused and no token is returned.
Access not enabled (HTTP 403)
MTN Token is available only to accounts enabled by an administrator. Requests from other accounts return 403.
Errors
Errors use the standard error format below, including validation errors, token generation failures and insufficient balance.
Body
{
"phone": "Phone"
}
Parameters
| phone | MTN phone number to generate the token for, 11 digits starting with 0 e.g 08031234567 |
Sample Response
{
"status": "ok",
"message": "Token generated successfully.",
"data": {
"access_token": "MTN access token",
"token_type": "Bearer",
"expires_in": "Token lifetime in seconds"
}
}
{
"status": "error",
"message": "Insufficient balance to generate MTN token."
}