Generate authentication token using GenerateToken API. Use the generated token to fetch details of an API based on JWT token based authentication for standard and dynamic API.
Prerequisites:
For JWT token based authentication, following keys must be enabled in the web.config file:
Generate authentication tokens using GenerateTokenAPI. These authentication tokens are used to provide a secure path to access restricted applications.
The HTTP type for GenerateTokenAPI is GET type.
Generate the token by passing either of the following fields in the Headers section of Postman application:
UserName and Password, or;
API Key
If API Key is enabled, then generate the token based on the API Key. If the API Key is disabled, then generate the token using Username and Password.
Perform the following steps to generate token using GenerateTokenAPI.
Open the Postman application.
Select HTTP Method as GET.
Click Headers tab.
Enter the username and password or the API key.
Click Send.
Get details of an API through JWT token based authentication in Standard and Dynamic API
After generating the token using GenerateTokenAPI, use any one of the below methods to get the details of standard API using the generated token through JWT token based authentication.
Method 1:
Open the Postman application.
Select HTTP Method as POST.
Navigate to Auth.
Select Type as Bearer Token.
Paste the token generated in the Token field.
Click Send.
Method 2:
Open the Postman application.
Select HTTP Method as POST.
Navigate to Headers.
Paste the Token in the Authorization field.
Click Send.
Details of the API are displayed. If the Token is wrong or if the validity time of the token has expired, then the result will show an error stating ‘Invalid or Expired Token’.
Note
If using JWT token based authentication is enabled, then no other authentication mechanism will work.
To find token based authentication instructions and collections.