Authentication
In order to access the Kravia API, you need to generate an access token using the credentials provided by Kravia.
In order to authenticate towards the Kravia API, you can use the following API endpoing https://docs.scalar.com/editor#/accounting-api/tag/authcontrollerv/POST/api/v2/auth/token
curl https://api.kravia.ai/api/v2/auth/token \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"audience": "AUDIENCE",
"client_id": "CLIENT_ID",
"client_secret": "CLIENT_SECRET",
"grant_type": "client_credentials"
}'
The response contains a standard access token
{
"access_token": "ACCESS_TOKEN",
"scope": "read:collectiondata write:collectiondata",
"expires_in": 86400,
"token_type": "Bearer"
}
The audience is environment specific and you will need to use the following value depending on the environment you are accessing:
-
Development: https://api-staging.kraviainkasso.no
-
Production: https://fincycleapi.kravia.net
In order to access the Kravia API you will also need a unique CLIENT_ID and CLIENT_SECRET. you can contact support@kravia.ai in order to get your own API credentials.
Once you have generated an access token, you will be able to access all of Kravia’s API both accounting and insights.