---
title: "Generate a temporary JWT-token"
method: GET
path: "/clients/authorization"
tags: ["Authorization"]
---

# Generate a temporary JWT-token

`GET /clients/authorization`

Issues a temporary JWT-token for making authorized API requests. 
A valid apiKey must be provided as a query parameter.

How to obtain an apiKey:
- In Sandbox, use POST `/test-api-keys` with a registered phone number 
  from the Client Portal (EBC): https://my.novapost.com/
- In PROD, use your personal apiKey provided by your manager

Usage:
- Call GET `/clients/authorization?apiKey={apiKey}`
- On success, copy the jwt from the response
- Open the **[Authorize](https://api.novapost.com/developers/index.html#auth)** dialog in this documentation, select the `JWT` scheme, 
  and paste the jwt
- All Try-it-out requests will then automatically include 
  `Authorization: {jwt}`

Notes:
- The jwt is valid for ~1 hour; request a new one after expiry
- Do not store jwt beyond its TTL
- The `/test-api-keys` route is not available in PROD</br>

🔹**Description of control elements:**

**SCHEMA**</br>
Displays the full technical structure of the request or response, including field names, data types, required fields, allowed values, and validation rules.
- **Single line description**</br>
  A description that fits into a single line; any text that does not fit remains hidden.
- **Multiline description**</br>
  An expanded description that displays more than one line of text.

**EXAMPLE**</br>
Shows a ready-made sample JSON with correctly formatted values to demonstrate how a valid request or response should look.

## Query parameters

- `apiKey` string, required

## Response `200`

JWT-token

- object
  - `jwt` string, json — Personal JWT-token, expires after one hour to prevent any fraud, requiring a new request to generate a fresh token.

## Other responses

- `401` — Unauthorized
- `422` — Validation error
- `503` — Connection time-out

---

[API](https://skmtc.net/novapost/apis/api-nova-post.md) · [All operations](https://skmtc.net/novapost/apis/api-nova-post/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/novapost/api-nova-post/revisions/60e380005037/schema)
