My app API requires authentication via an authentication token. In short, we send a request to a /authentication
endpoint and it responds with a JSON object containing a token, like:
{"token": "xxxxxxxxxxxxxxxxxxxxxx"}
Every other API endpoint in our application requires an authentication
header containing this token. Now, in Postman it's possible to do the authentication request, copy the token, open the next endpoint and paste the authentication
header in manually. But this becomes tedious and time-consuming when testing lots of endpoints.
Is there a way to have Postman save and automatically add the authentication
token from one request in any follow-up requests?
Even better, could Postman automatically send the /authentication
request prior to any of the other requests?