Authentication
Generating Access Token
The Generate Access Token Service is used to get a valid access token. The access token has to be specified in each request as described in the subparagraphs below.
The validity of the access token is time-limited and after each session, the token is invalidated irrespective of whether the service call resulted in a positive result or a failure. The access token will expire after 2 minutes if it is not used.
Generate access token
POST
https://api.mpayafrica.co.tz/v2/auth
Headers
Name
Type
Description
Content-Type
string
application/json
Request Body
Name
Type
Description
password
string
API password. Shared upon account creation
username
string
API username. Shared upon account creation
{
"status": 1,
"description": "Success",
"token": "0b7af09a-920c-47e5-b8f8-b253117c1446"
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"username": "academia",
"password": "ad540305-88b3-4aa4-9518-50c1504cb785"
}
Last updated
Was this helpful?