How to authenticate a user with Postman using token based api

The Postman API is a RESTful API that lets you create, retrieve, update and delete various resources. It can authenticate a user with an API by using the token endpoint.

You can download Postman from the below link

https://www.postman.com/downloads/

 

In order to authenticate a user with the API and get a JWT token, follow these steps:

1. Open a new request tab by clicking the plus (+) icon on the left side of your screen.

2. Select "New" on the top right of the screen.

3. Give your request tab a name and write in "POST".

4. Under "Method", select "JSON".

5. For URL, enter https://api-stage-demo-api-key/oauth/token

6. In order to access the raw data, you will need to provide your credentials. This is done by clicking on the body tab, then clicking on the raw radio button and Adding in JSON format user credentials.

6. Click Send Request at the bottom of your screen to send your request to the API server.

Here you will get a JWT token.

In the next blog, I will write about how to authenticate API requests using tokens.

Add comment