# Get Token from API using Postman

**URL:** <https://community.auth0.com/t/get-token-from-api-using-postman/95647>\
**Category:** Get Help\
**Tags:** oauth-2-0, protocols\
**Created:** [December 5, 2022, 1:49am UTC](https://community.auth0.com/t/get-token-from-api-using-postman/95647 "2022-12-05T01:49:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![murilo.gamboa.melo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/murilo.gamboa.melo/32/41705_2.png) [@murilo.gamboa.melo](https://community.auth0.com/u/murilo.gamboa.melo)\
**Post date:** [December 5, 2022, 1:49am UTC](https://community.auth0.com/t/get-token-from-api-using-postman/95647/1 "2022-12-05T01:49:25Z")

</div>

I’m trying to get the Bearer Token by using Postman, but after I’ve configured it, the only thing I keep receiving is a “Oops, something went wrong” message.

Here’s my configuration:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/0/f/0f06d69955ec00ef5b41807a83477a7f00d17458.png)  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/5/65204b3d890131467f90bb81785f7b01f3019eb8.png)

For my env variables, I just copied and pasted from Auth0 Dashboard

 ![image](https://global.discourse-cdn.com/auth0/original/3X/d/1/d1aa938064a3dd8447caca7a87574437482bc263.png)

Also, I’m using a Node local server, based on this course configuration:

> **[Free Auth0 Tutorial - Build Secure APIs with Auth0 and Postman](https://www.udemy.com/course/build-secure-apis-with-auth0-and-postman/)**
>
> Easily Add Authentication To Your APIs And Learn How To Test Them - Free Course

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 7, 2022, 8:20pm UTC](https://community.auth0.com/t/get-token-from-api-using-postman/95647/3 "2022-12-07T20:20:15Z")

</div>

Hi @murilo.gamboa.melo,

Welcome to the Auth0 Community!

What are you trying to do with the token? If you simply want to retrieve a user’s access/id tokens, there are easier ways than working through the entire code flow. For instance, you can set up a password grant and exchange username/password directly for tokens, or you could use our authentication API debugger to get them programmatically.

Take a look at this thread that covers the topics I just mentioned.

> [@Getting User Auth Token in Postman](https://community.auth0.com/t/getting-user-auth-token-in-postman/66413):
>
> Hello all, Very new to OAuth2.0 and Auth0, working on standing up a new RestAPI protected by Auth0. We also have a UI which uses the Auth0 Universal Login for our users to sign in on. Currently, I would like to test my API in postman so that I do not need to spin up our web app just to get the bearer token. To do this, I have been trying to follow many guides on using Postman’s OAuth 2.0 authorization. It feels like I am very close to my goal of being able to log in as one of our test users to…

If you want to do something different, let me know and we can work through it.

---

<div class="post-metadata">

**Author:** ![murilo.gamboa.melo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/murilo.gamboa.melo/32/41705_2.png) [@murilo.gamboa.melo](https://community.auth0.com/u/murilo.gamboa.melo)\
**Post date:** [December 8, 2022, 12:39pm UTC](https://community.auth0.com/t/get-token-from-api-using-postman/95647/4 "2022-12-08T12:39:32Z")

</div>

Hi @dan.woda, thanks!  
I’m trying to get the token and use it to access the private enpoint with it, I’ve generated the token via curl without any problem, but it didn’t work on postman when I try to use it, I keep getting the unauthorized error.  
I’ll upload a video showing the proccess.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 8, 2022, 8:24pm UTC](https://community.auth0.com/t/get-token-from-api-using-postman/95647/5 "2022-12-08T20:24:57Z")

</div>

Sounds good! let me know.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 22, 2022, 8:25pm UTC](https://community.auth0.com/t/get-token-from-api-using-postman/95647/6 "2022-12-22T20:25:02Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
