Reputation: 973
I have created an API in Laravel using Passport, everything is working fine, generating the access token and using the token in Postman to show the data. When the user is login, I save the access token in the database Users table The problem is that I have to pass the access token in the header part of postman manually. How I can pass the generated access token automatically to the header, or anywhere, there I need.
Upvotes: 0
Views: 871
Reputation: 1184
There is no choice, you have to add the token to the header in every request. To make things easy, you can create a 'Collection' in postman and set, for that collection, the login token. It will remain there in every request of the project.
Upvotes: 2