Generate your API key
To send requests to the API, you must include your API key. Here’s how to create it:- Go to your Chatling account and open the Project Settings.
- Click the API Keys tab.
- Press the
New API key
button. - Enter a name for the key and press
Generate key
. - Copy the newly created key. For security purposes, the API key will be displayed once only. Note it down and store it in a secure place.
Authentication
Your API key acts as the Bearer token and must be supplied in theAuthorization
header of every request.
Example
Example
Retrieving the chatbot ID
Some endpoints require that you pass a chatbot ID as the path parameter. Here’s a couple of ways to retrieve it:- Recommended method: Using the
List chatbots
endpoint, you can fetch all the chatbots along with their IDs. - Open the chatbot’s settings in your account and you will find its ID listed there.