The JWT token is a key component for secure interaction with Nova Post API.
What the token is used for:
- 1Authorization of requests. Each request to the API must contain a valid token in the header to confirm access rights.
- 2Client verification. The token confirms that the request came from an authorized person.
- 3Data protection. It prevents unauthorized access to confidential information.
Token characteristics
Format:
- 1The token is implemented in the JWT (JSON Web Token) format, consisting of three parts: header, payload, and signature.
- 2JWT has a standard structure that looks like
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJucCIsInN1YiI6IjEyMyIsImlhdCI6MTUxNjIzOTAyMiwiZXhwIjoxNTE2MjM5MDkyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Security:
- 1The token must be protected and not shared with third parties, as it grants access to the API.
- 2HTTPS is used to secure token exchanges.
Request Endpoints:
Tokens are used for the following Nova Post API endpoints:
- 1https://api.novaposhta.ua/v.1.0/
- 2https://api.novapost.com/v.1.0/
Learn more about Nova Post API endpoints
Token Limitations
- 1Each token is valid only for the specific API key with which it was generated.
- 2The token is valid for one hour. After this period, a new token must be obtained to continue interacting with the API.
- 3The maximum number of active sessions (tokens) for a single account may be limited by the system for security purposes.
Usage Recommendations
- 1Regularly refresh the token. Monitor the token's expiration time and always obtain a new token before making requests if the previous token has expired.
- 2Protect your API key and token. Do not disclose the API key and token, and use HTTPS for all requests to avoid data interception.
- 3Track token usage to prevent system overload and potential attacks.