Kayzen API supports standard OAuth with password grant type. You can use your username and password to get an access token by making a simple POST request like the following:
POST https://api.kayzen.io/v1/authentication/token // cURL curl -X POST \ 'https://api.kayzen.io/v1/authentication/token' \ -H 'authorization: Basic ' \ -H 'content-type: application/x-www-form-urlencoded' \ -d 'grant_type=password&username=&password='
|username||The email you use while logging into the Kayzen Platform (pass your encoded email address in username. For ex: if your username is [email protected] the encoded version of the same will be api%2Breporting%40kayzen.io)|
|password||Your Kayzen account password|
|Header||You are required to pass the |
Refer to this link to learn how to get your API Key and API Secret Key
The response to the authentication call is an OAuth token which should be included in the header calls of all future requests as Authorization: Bearer .... By default the token gets expired in 30 mins.
If your token expires, you will need to implement the OAuth refresh token flow by making the authentication call again and using the newly issued OAuth token for subsequent requests.
curl -X POST \ 'https://api.kayzen.io/v1/authentication/token' \ -H 'authorization: Basic ' \ -H 'content-type: application/x-www-form-urlencoded' \ -d 'grant_type=password&username=&password='
Once you get the authentication token, you are required to pass this token as the bearer token in your HTTP headers. A sample to list campaigns has been shown here
curl -X GET \ 'https://api.kayzen.io/v1/meta/campaigns?page=1&per_page=25?' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN'
We support standard HTTP error codes.
In the case of an authentication failure, you will receive one of the following "Authentication error" errors
a. Incorrect username/password- Invalid login credentials
b. Invalid Access Token - Invalid API Key.
Updated over 1 year ago
Learn more about getting started with Reporting API