# How can I retrieve access token name in pre-request script?

**URL:** <https://community.postman.com/t/how-can-i-retrieve-access-token-name-in-pre-request-script/30325>\
**Category:** Help Hub\
**Created:** [December 2, 2021, 9:05pm UTC](https://community.postman.com/t/how-can-i-retrieve-access-token-name-in-pre-request-script/30325 "2021-12-02T21:05:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trallnag](https://avatars.discourse-cdn.com/v4/letter/t/a87d85/32.png) [@Trallnag](https://community.postman.com/u/Trallnag)\
**Post date:** [December 2, 2021, 9:05pm UTC](https://community.postman.com/t/how-can-i-retrieve-access-token-name-in-pre-request-script/30325/1 "2021-12-02T21:05:04Z")

</div>

Hello,

I’m using the Authentication feature of Postman to get an access token for an OAuth2 app. I would like to retrieve the current access token name (if available) from the pre-request script.

So far I’m unable to find a way to do it.

Is it even possible? Would be great if someone could give me advice.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [December 3, 2021, 8:24am UTC](https://community.postman.com/t/how-can-i-retrieve-access-token-name-in-pre-request-script/30325/2 "2021-12-03T08:24:01Z")

</div>

@Trallnag Welcome to the Community 🥳

Yes this is very common question and you can find many in the forum which are already answered. For quick reference, please check this [post](https://community.postman.com/t/how-to-simulate-oauth-2-0-flow-in-postman-with-authorization-code/6820).
