API Authentication

Credentials

To interact with the Coactive.ai API, you will need a Bearer Token. As an Org Admin, you can retrieve the token using the credentials in your organization settings or by following the steps outlined below.

Prerequisites

  • You must have Org Admin privileges to access the CLIENT_ID and CLIENT_SECRET.
1

Sign into Your Organization

  1. Go to the Coactive.ai login page: https://app.coactive.ai/.

  2. Enter your Org Name and sign in using your account.

3

Access Credentials

  1. In the Settings menu, look for the Credentials option on the left-hand side of the screen.

  2. Click on Credentials to view your organization’s API credentials.

4

Retrieve Your CLIENT_ID and CLIENT_SECRET

  1. On the Credentials page, you will find the following:

    • CLIENT_ID: A unique identifier for your organization.

    • CLIENT_SECRET: A secure key used to authenticate your organization.

  2. Copy these values and store them securely.


Retrieving the Bearer Token

Please use the CLIENT_ID and CLIENT_SECRET as the username and password in Basic Auth to retrieve the Bearer Token.

If successful, you will receive the access_token which will be your bearer token with an expiry of 1 hour (3600 seconds).

1curl --request POST 'https://api.coactive.ai/api/v0/login' \
2-u '<CLIENT_ID>:<CLIENT_SECRET>'
1 {
2 "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Illvckw5SE1NQVE1bDZpMC1WMnFVaSJ9.eyJpc3MiOiJodHRwczovL2F1dGguY29hY3RpdmUuYWkvIiwic3ViIjoiZThSMW9jOHFIWmJES3Zha2JueThCWmQwMFh5OGxDNVFAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vYXBwLmNvYWN0aXZlLmFpLyIsImlhdCI6MTc0NDA0OTEyNSwiZXhwIjoxNzQ0MDUyNzI1LCJzY29wZSI6ImNyZWF0ZTp1c2VycyByZWFkOnVzZXJzIHVwZGF0ZTp1c2VycyBkZWxldGU6dXNlcnMgY3JlYXRlOmNyZWRlbnRpYWxzIHJlYWQ6Y3JlZGVudGlhbHMgdG9nZ2xlczppbnRlcm5hbCBmZWF0dXJlczp0cmlhbCBmZWF0dXJlczppbnRlcm5hbCBkZWxldGU6ZGF0YXNldHNcdCB1c2VyOmludml0ZSB1c2VyO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Using the Bearer Token

With the retrieved access_token, you can authenicate to our APIs via Bearer Authentication.

1Authorization: Bearer <ACCESS_TOKEN>

Important Notes

  • Keep your CLIENT_ID and CLIENT_SECRET confidential. Do not share them publicly or commit them to version control systems.
  • If you suspect your credentials have been compromised, please contact your Coactive Representative to have it regenerated

For further assistance, please contact Coactive.ai support at support@coactive.ai.