# 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.
