# Difficulty in getting corrrect response from GET request after entering Bearer token

**URL:** <https://community.postman.com/t/difficulty-in-getting-corrrect-response-from-get-request-after-entering-bearer-token/34949>\
**Category:** Help Hub\
**Created:** [May 3, 2022, 6:38am UTC](https://community.postman.com/t/difficulty-in-getting-corrrect-response-from-get-request-after-entering-bearer-token/34949 "2022-05-03T06:38:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharvarijoshi](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@sharvarijoshi](https://community.postman.com/u/sharvarijoshi)\
**Post date:** [May 3, 2022, 6:38am UTC](https://community.postman.com/t/difficulty-in-getting-corrrect-response-from-get-request-after-entering-bearer-token/34949/1 "2022-05-03T06:38:44Z")

</div>

**Your question may already have an answer on the community forum. Please search for related topics, and then read through the [guidelines](https://community.postman.com/t/about-the-just-getting-started-category/37) before creating a new topic.**

> Here’s an outline with best practices for making your inquiry.

_My question_:  
My bearer token is correct and ive also included the header. But my GET request still won’t work properly even after logging the user in. How to I get it to work?

_Details (like screenshots)_:

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/5/507cce2e24aae7ac24079e64484978196a91b2f1.png)

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/6/6a12d58807e4de1136252eee7ce77773e7e7834a.png)

_How I found the problem_:

_I’ve already tried_:  
I tried registering another user. But the required response message isn’t appearing

---

<div class="post-metadata">

**Author:** ![adam-allford](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@adam-allford](https://community.postman.com/u/adam-allford)\
**Post date:** [May 3, 2022, 10:25am UTC](https://community.postman.com/t/difficulty-in-getting-corrrect-response-from-get-request-after-entering-bearer-token/34949/2 "2022-05-03T10:25:12Z")

</div>

Hi @sharvarijoshi

Not sure what the issue may be but perhaps you could clarify a few things.

You send the “login” endpoint and email and password, which is how you get the token?  
You then use that token as a header value to check the “secured” endpoint to try and login?

**Simple things to check:**  
Is the account (related to the Email and password) valid/locked?  
Is the Authorization tab set to use “Bearer Token”?  
Are the localhost endpoints up and running?

_ **Suggestion:** _  
Save the token as a collection variable (you can use this: **pm.collectionVariables.set(“accessToken”, pm.response.json().token);** )

and then in you header you have the Auth value be **Bearer {{token}}**.

That will stop the chance of any mistakes from copying and pasting the access token in to the header value.
