⚠️ This lesson is retired and might contain outdated information.

Add a Custom Bearer Token in Postman to Authorize an API Request

Colby Fayock
InstructorColby Fayock
Share this video with your friends

Social Share Links

Send Tweet
Published 4 years ago
Updated 2 years ago

In this lesson, you'll learn how to authorize an API request in Postman. We'll walk through how to enable authorization and how to configure a Bearer Token to send with the request.

Colby Fayock: [0:00] We're going to start off the request to the movie endpoint of the-one-api.dev. We're trying to make a GET request, but we can see that it's unauthorized and we're also getting a 401 response. The one API is an endpoint that allows us to grab information about the "Lord of the Rings."

[0:13] In order to use that API endpoint, we need to include authorization. For authentication at this endpoint, we can create a free account where I can now have an access token that I can use to authorize my request. In order to authorize that request in Postman, we can first navigate over to the Authorization tab, refer this endpoint.

[0:28] We want to select the Bearer Token type where we can paste in our token. Now, if we send the request, we can see that we get a 200 OK and we see all of our movies.

[0:35] In review, if we want to provide authorization to an endpoint in Postman, we can first navigate over to the Authorization tab. Then we can select our authorization type which for us we chose Bearer Token, where we then entered in our token and we were able to send our request and see that it was successfully authorized.

egghead
egghead
~ 21 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today