# Outgoing Data Connection

**Outgoing data** refers to all the requests that the bot sends to the user. Connecting the processing of this data provides the opportunity to generate new reports and view the complete conversation history between the user and the bot (available on the corresponding plans).

## **How to Connect?**

Similar to connecting incoming traffic, there are two ways to connect outgoing data:

1. **Proxying**
2. **API**

## **Proxying**

### **If the bot operates via Webhook**

You'll need to add a bit of code. Specifically, you must change the URL from `https://api.telegram.org` to the address provided by our system. The platform will proxy all requests to the Telegram servers. Most libraries used for bot development allow you to change this URL.&#x20;

We have instructions for connecting getUpdates bots, which are also applicable for connecting outgoing traffic for webhook bots. The only difference is that you don't need to send getUpdates requests.&#x20;

All instructions for specific libraries can be found in this [section](/en/connect-bot/get-update.md). If your library is not listed or if you encounter difficulties with the connection, please contact support.

### **If the bot operates via getUpdates**&#x20;

If you've already connected the bot (incoming traffic) to Graspil, there's nothing more you need to do. All proxied requests will be processed.&#x20;

{% hint style="info" %}
If you are only sending getUpdates requests through our servers and excluding other requests, then outgoing data will not be processed.
{% endhint %}

## **API**

The method for sending data through the API is not yet available. We will be adding it soon.&#x20;

You will need to take the request and response from the Telegram API and forward them to Graspil.


---

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