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:

GET https://app.kolo.finance/data-share?response_type=code&client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&scope={SCOPE}
ParameterDescription

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:

GET https://app.kolo.finance/data-share?response_type=code&client_id=your_client_id&redirect_uri=https://app.adjutor.io&scope=transaction:list

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:

POST https://adjutor.lendsqr.com/v2/kolo/auth

Request Body:

code=authorization_code&grant_type=authorization_code&redirect_uri=https://app.adjutor.io
ParameterDescription

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:

curl --location 'https://adjutor.lendsqr.com/v2/kolo/auth' \
--data '{
    "redirect_uri": "https://app.adjutor.io",
    "grant_type": "authorization_code",
    "code": "kEhA1fQsT86ZxCqh"
}'

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": "your_access_token",
    "refresh_token": "your_refresh_token",
    "username": "username",
    "scope": "transaction:list",
    "token_type": "Bearer"
}
ParameterDescription

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