# Bot Integrations

The Bot API allows customers to add an external bot(s) to the Eko application. Bot connects to Eko via webhook endpoint and is authorized by OAuth2. When the bot has sent a message, the endpoint will receive a request from the Eko server once the bot has sent a message.

Bot API contains three main functionalities – user query, chat management, and message creation.

The Bot API is suitable for making a one-way communication bot such as bot for sending notification or alert. Also, an interactive bot that can communicate with users

### Getting API Key <a href="#getting-api-key" id="getting-api-key"></a>

To use the Bot API you must have an API key. The API key is a unique identifier that is used to authenticate requests. To get an API key:

1. Create Bot profile
2. Generate Access token by OAuth.
3. Add access token in the request

### Create Bot Profile <a href="#create-bot-profile" id="create-bot-profile"></a>

To implement bot on Eko, The developer has to create bot profile on Admin Panel.

Navigate to "BOT INTEGRATION" on side menu.

<figure><img src="https://114949873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkGjT4d6YfxBhnPZQPQSC%2Fuploads%2FhFsMpb28VnYlbXphtpA0%2FScreenshot%202568-04-11%20at%2014.22.27.png?alt=media&#x26;token=5ab0a645-7114-4596-8869-a84bfa734ada" alt=""><figcaption></figcaption></figure>

Click "Add Integration" and "Webhook API"

<figure><img src="https://114949873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkGjT4d6YfxBhnPZQPQSC%2Fuploads%2FU85W1Q6quw8AN7J8vWiG%2FScreenshot%202568-04-11%20at%2014.23.06.png?alt=media&#x26;token=4d095efa-55bd-4bb0-8437-cc31ccabf392" alt=""><figcaption></figcaption></figure>

Fill in bot information including Webhook URL then, click "Save".

<figure><img src="https://114949873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkGjT4d6YfxBhnPZQPQSC%2Fuploads%2FSMSSIWjdMrpxSV6jQpbn%2FScreenshot%202568-04-11%20at%2014.23.36.png?alt=media&#x26;token=cd9f4c66-a09b-4fed-9cca-38dc5854e286" alt=""><figcaption></figcaption></figure>

Once the bot is created, the client id and client secret of the bot will be generated.

<figure><img src="https://114949873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkGjT4d6YfxBhnPZQPQSC%2Fuploads%2F8cFxbUwWOu8MJE4697mA%2FScreenshot%202568-04-11%20at%2014.24.15.png?alt=media&#x26;token=56157b96-d3aa-4877-8edd-9c426a349cf0" alt=""><figcaption></figcaption></figure>
