Authentication

To use the knowledge API, you need an access token. With an access token, you can manage your bot’s knowledge via the API.

Generate an access token

  1. On the Ada dashboard, go to Platform > APIs.

    📘

    If you have a Scripted bot, where your team creates Answers rather than using a knowledge base to power your bot's responses, go to Settings > Integrations, then scroll down to the API Integrations section of the page.

  2. Beside Knowledge API, click Configure. The Knowledge API window opens.

  3. Click Generate a new Access Token.

  4. Copy the API Access Token. Save it in a secure place, because you won’t be able to access it again.

    • If you misplace your token, you can click Generate a new Access Token again to invalidate your previous token and create a new one.

Authenticate your requests

To authenticate your requests to the Knowledge API, you have to send your Access Token in the Authorization header in all requests to the API. Without it, your requests will fail.

Example of a request

curl --location {BOT_URL}/api/knowledge/v1/articles' \
--header 'Authorization: Bearer {YOUR_API_TOKEN}’

Example responses

// If the request is not authenticated
status: 401
{
	"message": "Unauthorized"
}

// If the request is authenticated
status: 200
{
	"data": []
}