GoDigital
GoDigital Payments API

Authentication

Server

Exchange your client credentials for a short-lived bearer access token. The token endpoint only accepts requests from whitelisted IP addresses.


Get an access token

POST
https://api-sandbox.godigital.tz/api/v1
/oauth/token

Exchanges your client credentials for a bearer access token using the OAuth2 client credentials grant. Tokens are valid for expires_in seconds (normally 3600).

Request a new token before the current one expires, and send it on every payment request in the Authorization: Bearer <token> header.

:::caution This endpoint is protected by IP whitelisting. Requests from non-whitelisted public IP addresses are rejected. :::

Get an access token › Request Body

grant_type
​string · enum · required
Enum values:
client_credentials
client_id
​string · required

Client ID issued during onboarding.

client_secret
​string · required

Client secret issued during onboarding. Never expose it in a browser or mobile app.

Get an access token › Responses

Access token issued.

access_token
​string

JWT bearer token.

token_type
​string
expires_in
​integer

Lifetime of the token in seconds.

scope
​string