> For the complete documentation index, see [llms.txt](https://alfabit.gitbook.io/alfabit-aml/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alfabit.gitbook.io/alfabit-aml/nachalo-raboty/autentifikaciya-zaprosov.md).

# Аутентификация запросов

Для аутентификации запроса используется HTTP Basic Auth — отправка API ключа в заголовке HTTP-запроса. Для получения API ключа перейдите в [AlfaBit AML Bot](https://t.me/AlfaBitAml_bot), в разделе "Мой Кабинет" выберите "API ключ".

> Для авторизации используйте этот код:

```python
import requests

response = requests.request("method", 
                            "api_endpoint_here", 
                            headers={
                              "Authorization: aml_authorization_api_key"
                            })
```

```sh
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "Authorization: aml_authorization_api_key"
```

> Замените `aml_authorization_api_key` своим API key.
>
> `Authorization: aml_authorization_api_key`
