Initializing Authorization
In order to gain access to the customer's data using Kolo's API, you need to initialize the authorization process. This involves exchanging an authorization code for an access token, which will allow you to interact with the other API endpoints securely and with consent.
Step 1: Obtain Authorization Code
In order to obtain an authorization code, you need to redirect users to the Kolo authorization URL so they can grant you consent to access their data. Here’s the format of the authorization URL:
response_type
Set this to code
to receive an authorization code.
client_id
Your Adjutor application's client ID. You get this when creating an app on Adjutor.
redirect_uri
The URI to redirect to after authorization.
scope
The scope of the access request (e.g., transaction:list
).
Example Request:
Step 2: Exchange Authorization Code for Access Token
Once the user authorizes your application and grants you access, they will be redirected back to your specified redirect_uri
with an authorization code. You need to exchange this code for an access token. Using this access token, you can then call the other endpoints. The format for this can be found below:
Request Body:
code
The authorization code received from the previous step.
grant_type
Set this to authorization_code
.
redirect_uri
The same redirect URI used in the authorization request.
Example Request:
Step 3: Receive the Access Token
If the request is successful, you will receive a response containing the access token and other related information.
Example Response:
access_token
The token to be used for authenticated requests
token_type
Type of token, typically "Bearer".
username
The name of the user
refresh_token
Token used to refresh the access token.
scope
Scopes granted by the access token
By following these steps, you can successfully initialize the authorization process and start using the Kolo API to access customer financial data securely.
Last updated