The Generate Token API enables you to generate authentication tokens used to provide secure path to access restricted applications. This API does not have payload, you must enter the following required details to generate the API token.
To generate JWT token API, perform the following steps:
Open the Postman application (you can use any application to get API response).
Select HTTP Method as GET.
Click Headers and specify the APIKey that you generated for the specific User from the application using User > Access tab > Login Type as API Key.
Specify the API Key expiry date and copy the default API Key displayed there.
Go back to Postman application (or any other API App) and after selecting the method as GET, specify the GenerateToken API as given in following example and click Headers.
Example in the URL replace <<domain-name>> based on your domain-name: https://<novatech.com>/api_report/GenerateTokenClick Headers and select the API Key checkbox and specify the Value of API Key.
Click Send to fetch the Token details.
The Body of the response will give you the Token which you can use as a 'Bearer Token' in Authorization tab for connecting and executing other API Queries.Save Token for Future Reference
Save the Token generated in a secure location for further usage of when you use the API Queries. Token generated will be passed as Bearer Token in Authorization > Bearer Token for authentication purpose when you execute an API.
Figure: Token generated using API Key
Request:
(Headers include API key provided separately)
Response:
Token
Use only the token value, without quotes or commas.
{
"token": "eyJhbGci…",
"expiresIn": "3600"
}