Airtime API

Gift Cards API

Utility Payments API

× Reloadly Developer Documentation Support

Authentication

Reloadly uses access tokens ( or bearer tokens ) to authenticate requests and grant access to our APIs. Access tokens differ across our various products. This means that you can only use an access token generated for the airtime service on the Airtime API, the same goes for other products.

Also, Reloadly has two operating environments - Production which allows you work with live credentials while building real world applications and Sandbox which helps you access our APIs in test mode and simulate real-like scenarios. Below is a table that shows the server URL for Reloadly's Airtime products.

ProductEnvironmentService URL
AirtimeProductionhttps://topups.reloadly.com
Sandboxhttps://topups-sandbox.reloadly.com
Number LookupProductionhttps://topups.reloadly.com
Sandboxhttps://topups-sandbox.reloadly.com


To get an access token, first obtain your client id and client secret from the Reloadly dashboard. Then make a POST request with the payload format provided in the code sample section.

Create Access Token

Reloadly employs the OAuth 2.0 standard.Note that all API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Once successfully retrieved, your access token is then passed as a bearer token in the header of any API endpoint you wish to use in making a request.

Request
Request Body schema: application/json

Payload Description

client_id
string

Your account's client ID.

Example: "qwcLzXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
client_secret
string

Your account's client secret.

Example: "7kscVxQZ32-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
grant_type
string

The access type being specified.

Example: "client_credentials"
audience
string

The product which the access token is to be used for.

Example: "https://giftcards.reloadly.com"
Responses
200

Successfully created an access token.

401

Failed due to an unauthorized request.

post/oauth/token
Request samples
application/json
{
  • "client_id": "qwcLzXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  • "client_secret": "7kscVxQZ32-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  • "grant_type": "client_credentials",
}
Response samples
application/json
{
  • "access_token": "eyJraWQiOiJjNGE1ZWU1Zi0xYmE2LTQ1N2UtOTI3Yi1lYzdiODliNzcxZTIiLCJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2NzkzIiwiaXNzIjoiaHR0cHM6Ly9yZWxvYWRseS1zYW5kYm94LmF1dGgwLmNvbS8iLCJodHRwczovL3JlbG9hZGx5LmNvbS9zYW5kYm94Ijp0cnVlLCJodHRwczovL3JlbG9hZGx5LmNvbS9wcmVwYWlkVXNlcklkIjoiNjc5MyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyIsImF1ZCI6Imh0dHBzOi8vZ2lmdGNhcmRzLXNhbmRib3gucmVsb2FkbHkuY29tIiwibmJmIjoxNjU4MDY2NDkxLCJhenAiOiI2NzkzIiwic2NvcGUiOiJkZXZlbG9wZXIiLCJleHAiOjE2NTgxNTI4OTEsImh0dHBzOi8vcmVsb2FkbHkuY29tL2p0aSI6ImIyMmY3MDRmLTJkMWEtNDZjMC1hYjUxLWZkMzAwNWQxNWM0MiIsImlhdCI6MTY1ODA2NjQdjwfbianRpIjoiMWM1ZmY5YTItNzJhMC00ZDg2LWFjZmYtZmU1NDMxNGU0OGQ4In0.P3f-eNbrjFuGHuDKNGjskzifPARaJPRMVS4gGisp0ZA",
  • "scope": "developer",
  • "expires_in": 5184000,
  • "token_type": "Bearer"
}