# Авторизация

## Авторизация <a href="#id-93900fccba" id="id-93900fccba"></a>

Graspil API использует ключи API для обеспечения доступа к API. Вы можете получить ключ в вашем [личном кабинете](https://app.graspil.com/).&#x20;

Чтобы получить ключ, перейдите в раздел "**Мои боты**" выберите соответствующего бота и кликните по иконке ключа.

<figure><img src="/files/Bq2Rx0uOsWi3DTHun2nh" alt="" width="563"><figcaption><p>Как найти API KEY</p></figcaption></figure>

Каждому боту соответствует свой уникальный ключ.

Graspil API ожидает, что ключ API будет включен во все запросы к API в заголовке, который выглядит следующим образом:

`Api-Key: meowmeowmeow`

> &#x20;Замените мяуконье `meowmeowmeow` на your API key.

{% tabs %}
{% tab title="PHP" %}

```php
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Api-Key: ' . $api_key]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {"Api-Key": api_key}
response = requests.get(url, headers=headers)
```

{% endtab %}

{% tab title="Js" %}

```javascript
fetch(url, {
  method: "GET",
  headers: {
    "Api-Key": api_key
  }
}).then();
```

{% endtab %}
{% endtabs %}


---

# 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/ru/api/auth.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.
