> 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/methods/ua/overview/authorization.md).

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

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

> Генерує тимчасовий JWT-токен для виконання авторизованих API-запитів. Як query-параметр необхідно передати валідний apiKey.\
> \
> Як отримати apiKey:\
> \- У Sandbox використайте POST \`/test-api-keys\` із зареєстрованим номером телефону з Client Portal (EBC): <https://my.novapost.com/\\>
> \- У PROD використовуйте персональний apiKey, наданий вашим менеджером\
> \
> Використання:\
> \- Виконайте GET \`/clients/authorization?apiKey={apiKey}\`\
> \- У разі успіху скопіюйте jwt із відповіді\
> \- Відкрийте діалог \*\*\[Authorize]\(<https://api.novapost.com/developers/index.html#auth)\\*\\>\* у цій документації, виберіть схему JWT і вставте jwt\
> \- Після цього всі Try-it-out запити автоматично включатимуть \`Authorization: {jwt}\`\
> \
> Примітки:\
> \- JWT дійсний приблизно 1 годину; після завершення строку дії потрібно запросити новий\
> \- Не зберігайте jwt довше за його TTL\
> \- Маршрут /test-api-keys недоступний у PROD<br>

```json
{"openapi":"3.0.0","info":{"title":"API Nova Post","version":"1.0.0"},"tags":[{"name":"Authorization"}],"servers":[{"description":"sandbox","url":"https://api-stage.novapost.com/v.1.0/"},{"description":"production","url":"https://api.novapost.com/v.1.0/"}],"paths":{"/clients/authorization":{"get":{"tags":["Authorization"],"summary":"Згенерувати тимчасовий JWT-токен","description":"Генерує тимчасовий JWT-токен для виконання авторизованих API-запитів. Як query-параметр необхідно передати валідний apiKey.\n\nЯк отримати apiKey:\n- У Sandbox використайте POST `/test-api-keys` із зареєстрованим номером телефону з Client Portal (EBC): https://my.novapost.com/\n- У PROD використовуйте персональний apiKey, наданий вашим менеджером\n\nВикористання:\n- Виконайте GET `/clients/authorization?apiKey={apiKey}`\n- У разі успіху скопіюйте jwt із відповіді\n- Відкрийте діалог **[Authorize](https://api.novapost.com/developers/index.html#auth)** у цій документації, виберіть схему JWT і вставте jwt\n- Після цього всі Try-it-out запити автоматично включатимуть `Authorization: {jwt}`\n\nПримітки:\n- JWT дійсний приблизно 1 годину; після завершення строку дії потрібно запросити новий\n- Не зберігайте jwt довше за його TTL\n- Маршрут /test-api-keys недоступний у PROD\n","parameters":[{"in":"query","required":true,"name":"apiKey","schema":{"type":"string"},"description":"Для використання цього методу потрібен персональний API-ключ."}],"responses":{"200":{"description":"JWT-token","content":{"application/json":{"schema":{"type":"object","properties":{"jwt":{"type":"string","description":"Персональний JWT-токен, дійсний протягом 1 години для запобігання шахрайству. Після завершення терміну дії потрібно згенерувати новий токен.","format":"json"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/Validation"},"503":{"$ref":"#/components/responses/Time-out"}}}}},"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"}}}}}}}}
```


---

# 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/methods/ua/overview/authorization.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.
