Three-Legged OAuth Flow
Request access token
To use this API, you must exchange the auth_req_id for an access token. The token is valid for 59 minutes and 59 seconds and can be used for multiple requests.
The bearer tokens can only be used for a specific country. For example, If you generate a token for a UK mobile number (MSISDN), you cannot use it to query a German number.
If the request is valid, the API returns an access_token, along with expiry and scope information. This access token can then be used in one or more requests as long as it remains valid. The API will return an error message if the request is invalid.
To exchange the auth_req_id for an access token:
Make a “/token” request. Use the following parameters in the request. All parameters are required:
Parameter | Description |
|---|---|
accept | Specifies the response format expected from the server. Typically set to application/json. |
X-Correlator | A unique identifier for tracking requests across systems for auditing or debugging. |
Content-Type | Specifies the format of the request body. Typically set to application/x-www-form-urlencoded. |
auth_req_id | The unique identifier for the authentication request issued during the authorization step. |
The last bearer token and trace ID will be stored in collection variables associated with the API solution that you have chosen.
Token request example
curl -X 'POST' \ 'https://example.com/openIDConnectCIBA/v1/token' \ -H 'accept: application/json' \ -H 'X-Correlator: [[X-Correlator-masked]]' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'auth_req_id=[[Authorization-req-id-masked]]'Token response example
HTTP/1.1 200 OK { "access_token": "[[Access-token-masked]]", "token_type": "Always \"Bearer\"", "expires_in": 3599, "id_token": "[[ID-token-masked]]" }Access the Protected Resource
Use the access token in the Authorization header to access the API’s protected endpoints.