How to generate a JWT token
To send request to the Nova Post API, you must generate a JWT token. The token ensures proper authentication and authorization when executing API requests.
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-keyswith 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 dialog in this documentation, select the
JWTscheme, and paste the jwtAll 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-keysroute is not available in PROD
🔹Description of control elements:
SCHEMA 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 A description that fits into a single line; any text that does not fit remains hidden.
Multiline description An expanded description that displays more than one line of text.
EXAMPLE Shows a ready-made sample JSON with correctly formatted values to demonstrate how a valid request or response should look.
To utilize this method, a personal API key is required.
JWT-token
Personal JWT-token, expires after one hour to prevent any fraud, requiring a new request to generate a fresh token.
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJucCIsImlhdCI6MTY4NTYyNzQxNCwiZXhwIjoxNjg1NjMxMDE0LCJjaWQiOiI1YzQxMmUzYS01ODY4LTQ4YjktYTYwYS0wZTAzOTI4NGVjNDYiLCJyZWYiOiI2NDI0NmRkMzg0ZWI3Yzg2MmMwMzg3YzAifQ.MmhM9rHCYItjA5a7B9PtrdKUKRiHhN43UotWKtKjt78Unauthorized
Validation error
Connection time-out
GET /v.1.0/clients/authorization?apiKey=text HTTP/1.1
Host: api-stage.novapost.pl/
Accept: */*
{
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJucCIsImlhdCI6MTY4NTYyNzQxNCwiZXhwIjoxNjg1NjMxMDE0LCJjaWQiOiI1YzQxMmUzYS01ODY4LTQ4YjktYTYwYS0wZTAzOTI4NGVjNDYiLCJyZWYiOiI2NDI0NmRkMzg0ZWI3Yzg2MmMwMzg3YzAifQ.MmhM9rHCYItjA5a7B9PtrdKUKRiHhN43UotWKtKjt78"
}The token is valid for 1 hour. Once the token expires, you must send a new request to obtain a fresh token using the same API key.
Last updated