# Описание процесса аутентификации

Все запросы к API goodPayments должны быть авторизованы с использованием уникального API-ключа мерчанта. Авторизация выполняется путем передачи API-ключа в HTTP-заголовке каждого запроса.

**Базовый URL:** <https://app.goodpayments.io/v1/api>&#x20;

API-ключ передается в заголовке:

```yaml
Authorization: <apiKey>
```

**Пример запроса:**

```yaml
curl -X 'GET' \
  'https://app.goodpayments.io/v1/api/merchant' \
  -H 'accept: application/json' \
  -H 'Authorization: 94a48138b1f41b9cdb3e12c2ff0c7cbe1c7a5f50a311a5054b903cad84215662'
```

Если заголовок с корректным API-ключом отсутствует, ключ недействителен или IP-адрес отсутствует в белом списке, сервер возвращает ответ с кодом **403**.

**Пример ответа с ошибкой:**

```json
{
  "detail": "Invalid API key"
}
```

<br>


---

# 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://goodpayments.gitbook.io/docs/documentation/ru/api-dokumentaciya/opisanie-processa-autentifikacii.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.
