> For the complete documentation index, see [llms.txt](https://api-portal.novapost.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-portal.novapost.com/novaposhta-docs/ua/kroki-integraciyi/vikoristannya-tokeniv.md).

# Використання токенів

JWT токен - ключовий компонент безпечної взаємодії з API Nova Post.

#### Для чого використовується токен

* Авторизація запитів. Кожен запит до API має містити валідний токен у заголовку для підтвердження прав доступу.
* Верифікація клієнтів. Токен підтверджує, що запит дійсно надійшов від уповноваженої особи.
* Захист даних. Запобігає несанкціонованому доступу до конфіденційної інформації.

#### Характеристики токена

Формат:

* Токен реалізований у форматі JWT (JSON Web Token), що складається з трьох частин: заголовка (header), корисного навантаження (payload) та підпису (signature).
* JWT має стандартну структуру, яка виглядає як: `eyJhbGciOiJIU5cCI6IkpXVCJ9.eyJpc3MiOiJDkyfQ.SflKxwRJSMeKKF`

Безпека:

* Токен має бути захищений і не передаватися третім особам, оскільки він надає доступ до API.
* Використовується HTTPS для захищеного обміну токенами.

\
Точки входу запитів:

* Токени використовуються для наступних ендпоінтів API Nova Post:
* [https://api.novaposhta.ua/v.1.0/  ](<https://api.novaposhta.ua/v.1.0/&#xD;&#xA;https://api.novapost.com/v.1.0/>)
* [https://api.novapost.com/v.1.0/](<https://api.novaposhta.ua/v.1.0/&#xD;&#xA;https://api.novapost.com/v.1.0/>)

<p align="right"><a href="/novaposhta-docs/ua/kroki-integraciyi/yak-vibrati-tochku-dostupu.md">Детальніше про точки доступу API Nova Post</a></p>

#### Обмеження токенів

* Кожен токен дійсний лише для конкретного API ключа, з яким він був згенерований.
* Термін дії токена - одна година. Після закінчення цього періоду необхідно отримати новий токен, щоб продовжити взаємодію з API​​.
* Максимальна кількість активних сесій (токенів) для одного облікового запису може бути обмежена системою для забезпечення безпеки.

> ### Рекомендації щодо використання
>
> * Регулярно оновлюйте токен. Стежте за терміном дії токена та завжди отримуйте новий токен перед виконанням запитів, якщо попередній токен протермінований.
> * Захищайте API - ключ і токен. Не розголошуйте API - ключ і токен, використовуйте HTTPS для всіх запитів, щоб уникнути перехоплення даних.
> * Відстежуйте використання токенів, щоб запобігати перевантаженню системи та можливим атакам.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api-portal.novapost.com/novaposhta-docs/ua/kroki-integraciyi/vikoristannya-tokeniv.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
