# Links from the bot

To track clicks on external links from your bot, you can use our special links. When a user follows such a link, a corresponding event will automatically be created for that user. In addition, the user’s geolocation will be determined.

Links can have two formats, but they must include the following parameters:

<table><thead><tr><th width="134.140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>key</strong></td><td>The link key you receive in your personal account</td></tr><tr><td><strong>url</strong></td><td>The http/https address where the user should be redirected. The address must be URL-encoded. Example functions: encodeURIComponent in JS, urlencode in PHP, urllib.parse.quote in Python</td></tr><tr><td><strong>uid</strong></td><td>The Telegram ID of the user clicking the link (the one you send this message to)</td></tr><tr><td><strong>event</strong></td><td>Event name in Latin characters, max. 250 characters. This exact name will appear in your reports</td></tr></tbody></table>

{% hint style="warning" %}
The link setup interface is not ready yet, but you can already use them. To get a key for your link, please contact support :)
{% endhint %}

### **Format 1**

You can place all the variables above as query parameters (after the ? symbol), e.g.:

<https://tlin.cc/i?**key**=><mark style="color:red;">**yourKey**</mark>&**url**=<mark style="color:purple;">**urlAddress**</mark>&**uid**=<mark style="color:yellow;">**123**</mark>&**event**=<mark style="color:green;">**eventName**</mark>

```url
https://tlin.cc/i?key=yourKey&url=urlAddress&uid=123&event=eventName
```

### **Format 2**

This format is a bit shorter. The variables are separated by slashes — make sure to keep the correct order:

<https://tlin.cc/i/><mark style="color:red;">**key**</mark>/<mark style="color:green;">**event**</mark>/<mark style="color:yellow;">**uid**</mark>?**url**=<mark style="color:purple;">**urlAddress**</mark>

```url
https://tlin.cc/i/12mew345/myevent/123456?url=https%3A%2F%2Fexample.com
```


---

# 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/app/outside-links.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.
