> For the complete documentation index, see [llms.txt](https://docs.graspil.com/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graspil.com/en/connect-bot.md).

# Bot connection

You can connect a bot to Graspil in 4 different ways:

1. [Auto connection (MtProto)](#avto-podklyuchenie-mtproto)
2. [API](#api)
3. [MtProto collector on your own server](#sborshik-mtproto-na-vashem-servere)
4. [Proxying](#proksirovanie)

{% hint style="warning" %}
Make sure you connect your bot using only one of these methods, otherwise the data will be duplicated.
{% endhint %}

## Auto connection (MtProto)

This is the simplest way to connect. Just provide your token and the system will do everything for you.

This connection method uses the MtProto protocol, which works in parallel with your current connection. It works with all bots and bot builders. It collects slightly more data compared to the other methods.

### API

This method does not require passing a token. You can use the API to connect your bot to the platform. It takes a few minutes and requires writing just 1 request that will send the data.

You can read more about connecting a bot via API in [this section](/en/connect-bot/api.md)

## MtProto collector on your own server

You can install our data collector on your own server, getting the benefits of both methods - MtProto + API:

1. No need to pass a token
2. You get the maximum amount of data thanks to MtProto
3. No need to modify your bot - the system works independently of the bot.
4. You get access to broadcasts without passing a token, while keeping full control of the process.

{% hint style="warning" %}
This software is under development. If you're interested in this method and willing to take part in the beta test, let us know ;)
{% endhint %}

## Proxying

With this connection method, you need to insert our server between your bot and Telegram. More details are described in [this](/en/connect-bot/get-update.md#proksirovanie) section.

{% hint style="warning" %}
This connection method is outdated; we recommend using MtProto or API instead. These connection methods are more flexible and reliable.
{% endhint %}

<br>
