> 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/documentation/kroki-integraciyi/yak-zgeneruvati-jwt-token.md).

# Як згенерувати JWT - токен

## Згенерувати тимчасовий JWT-токен

> Генерує тимчасовий JWT-токен, який потрібно передавати в заголовку Authorization у всіх наступних запитах. Для генерації потрібен персональний API-ключ.

```json
{"openapi":"3.0.0","info":{"title":"API Nova Post","version":"1.0.0"},"tags":[],"servers":[{"description":"production","url":"https://api.novapost.com/v.1.0"},{"description":"sandbox","url":"https://api-stage.novapost.pl/v.1.0"}],"paths":{"/clients/authorization":{"get":{"tags":["Authorization"],"description":"Генерує тимчасовий JWT-токен, який потрібно передавати в заголовку Authorization у всіх наступних запитах. Для генерації потрібен персональний API-ключ.","responses":{"200":{"description":"JWT-token","content":{"application/json":{"schema":{"type":"object","properties":{"jwt":{"type":"string","description":"Personal JWT-token, expires after one hour to prevent any fraud, requiring a new request to generate a fresh token.","maxLength":32,"format":"json"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/Validation"},"503":{"$ref":"#/components/responses/Time-out"}},"summary":"Згенерувати тимчасовий JWT-токен","operationId":"getClientsAuthorization"}}},"components":{"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Validation":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Time-out":{"description":"Connection time-out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"errors":{"type":"object","properties":{"":{"type":"string"}}}}}}}}
```

> Токен діє впродовж 1 години. Після закінчення терміну дії токена, необхідно виконати повторний запит для отримання нового токена, використовуючи той самий API - ключ.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-portal.novapost.com/novaposhta-docs/documentation/kroki-integraciyi/yak-zgeneruvati-jwt-token.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.
