You can now also use OAuth2 as an authentication method when using our rest API in Kaisa, irrespectively of the version you are using (In Kaisa we have a v2 and a v3 versions for our rest API) or our DNCS API solution.
If you are looking for more details on OAuth2 when using our Engagement Builder, you can find out more details here.
What do I need?
In order to use OAuth2 with our rest API or DNCS API, you will need a Client ID and a Client secret, to be sent to a Kaisa endpoint to retrieve a token to be used in your requests to our backend. You cannot create a Client id or secret independently so please do get in touch with our Support team and we can get this sorted out for you.
How to request a token?
With the Client ID and the Client Secret, you can send a request to the following endpoint in Kaisa:
https://auth.freespee.com/oauth2/token
You can send a request with the following parameters:
grant_type (sent as "client_credentials")
client_id
client_secret
For example, you can send a request as follows (for JSON)
curl -X POST https://auth.freespee.com/oauth2/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "123abc-456def-789ghi",
"client_secret": "1234567890"
}'
Or as follows for url-encoded requests:
curl -X POST https://auth.freespee.com/oauth2/token \
-d "grant_type=client_credentials" \
-d "client_id=123abc456def789ghi" \
-d "client_secret=1234567890"
Our response will return a token to be used in a request to our rest API, when suing OAuth2 as the authentication method.
Note: The token will expire in 5 minutes (300 seconds).
Using OAuth2 tokens with our rest API / DNCS API
Once you have your token you can add it as a Authorization header in your request to our endpoint with a bearer token, such as:
curl -X GET https://api.analytics.freespee.com/version/customers \
-H "Authorization: Bearer <insert_token_here>"
You can see all available resources:
For v2: Developers section
For v3: Developers section
DNCS API: Developer article
Comments
0 comments
Please sign in to leave a comment.