What Is an Access Token?
The Access Token is needed in every request sent to the system in order to validate the sending user.
Request Structure
Method: POST
Endpoint: https://api-gateway.interswitchng.com/passport/oauth/token?env=test
Request Body/Payload
request test values from Interswitch
Fields | Sample Values |
grant_type | password | client_credentials |
username | optional |
password | optional |
Request Headers
(as Key:Value pairs)
Content-Type : application/x-www-form-urlencoded
Authorization : Basic Base64(clientID:SecretKey)
sample Authorization: Basic SUtJQTk2MTRCODIwNjRENjMyRTlCNjQxOERGMzU4QTZBNEFFQTg0RDcyMTg6WENUaUJ0THkxRzljaEFueWcwejNCY2FGSzRjVnB3RGcvR1R3MkVtalRaOD0=
Find sample response
The
expires_in
field represents how long before the token expires (in seconds).