# Chatbot connection

You can choose between two types of chatbots. The main differences are described in the following table:

<table><thead><tr><th width="156">Chatbot</th><th width="208">Sending a message</th><th width="209">Receiving a message</th><th>Sending activities</th></tr></thead><tbody><tr><td>Chatbot API</td><td><a href="api-chatbot#send-activities">API endpoint</a></td><td><a href="api-chatbot#activities-webhook-event-reference">Custom webhook</a></td><td><a href="api-chatbot#send-activities">API endpoint</a></td></tr><tr><td>Microsoft Bot Framework</td><td><a href="https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline">Direct Line WebSocket</a></td><td><a href="https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline">Direct Line WebSocket</a></td><td><a href="https://docs.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-channeldata">ChannelData</a></td></tr></tbody></table>

## Chatbot API

Chatbot API allows the connection of any chatbot. The connection is done by registering a webhook to which events are sent. A chatbot is added by inserting your webhook to send events in the [Chatbots](https://docs.mluvii.com/en/for-administrators/tenant-management/settings/chatbots) section.

## Microsoft Bot Framework

The connection is done using the [Microsoft Direct Line](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline?view=azure-bot-service-4.0) API WebSocket. A chatbot is added by inserting a secret in the [Chatbots](https://docs.mluvii.com/en/for-administrators/tenant-management/settings/chatbots) section.

## Supported activities

Most activities are common to both types of chatbots. Chatbot API differs only in the need to specify SessionId in the activity.

## Tips and Tutorials

[This section](https://docs.mluvii.com/en/for-it-specialists/chatbot-connection/tips-and-tutorials) contains tutorials for specific scenarios that you may encounter during implementation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mluvii.com/en/for-it-specialists/chatbot-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
