# Connecting the bot

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

1. Auto connection (MtProto)
2. API
3. MtProto collector on your server
4. Proxying

{% hint style="warning" %}
Make sure you connect the 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 the token, and the system will handle everything for you.

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

## API

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

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

## MtProto collector on your server

You can install our data collector on your server and get the advantages of both MtProto and API methods:

1. No need to provide a token
2. Maximum data collection thanks to MtProto
3. No need to modify your bot; the system works independently of it
4. Access to campaigns without passing a token, while keeping control over the process

{% hint style="warning" %}
This software is currently under development. If you’re interested in this method and ready to participate in beta testing, please contact us ;)
{% endhint %}

## Proxying

In this method, you insert our server between your bot and Telegram. More details can be found in this [section](/en/connect-bot/get-update.md).

{% hint style="danger" %}
This method is outdated. We recommend using MtProto or API instead, as they are more flexible and reliable.
{% endhint %}


---

# 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.graspil.com/en/connect-bot.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.
