Calling an API with Bearer token using Postman
The Chrome extension Postman is a great tool for testing APIs. It is simple to use and have several useful features such as collections for easy retrieval of requests. If you need to test authentication or want to make requests where a Bearer token is required, you need to add a token to the header.
One way to do this is to use Authentication Helpers. They can help you if you use Basic Auth or OAuth. But if you just need to pass a Bearer token, it is just as easy to set it up yourself.
First you need to get a hold of a valid token. Your API should have a Login endpoint that you can call to retrieve the token.
If you have made a successful Post request, you should get a response containing a Bearer token. Copy it and add it to your header.
key= "Authorization", value = "Bearer [your token]"