# Global variable for bearer token

**URL:** https://discourse.nodered.org/t/global-variable-for-bearer-token/51943
**Category:** General
**Tags:** security
**Created:** [6 October 2021 21:22 UTC](https://discourse.nodered.org/t/global-variable-for-bearer-token/51943 "2021-10-06T21:22:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![humphrysr](https://avatars.discourse-cdn.com/v4/letter/h/4af34b/32.png) [@humphrysr](https://discourse.nodered.org/u/humphrysr)
#### Post date: [6 October 2021 21:22 UTC](https://discourse.nodered.org/t/global-variable-for-bearer-token/51943/1 "2021-10-06T21:22:04Z")

</div>

Is there a global var that can be used to take a bearer token and used to populate the token value in the HTTP token value text box? Basically one token, and 4-5 HTTP request nodes.

thank you

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [7 October 2021 16:02 UTC](https://discourse.nodered.org/t/global-variable-for-bearer-token/51943/2 "2021-10-07T16:02:47Z")

</div>

The bearer token is in the headers. So you can extract it from the headers to a variable and then put it onto the headers for another request if you need to.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [6 December 2021 16:03 UTC](https://discourse.nodered.org/t/global-variable-for-bearer-token/51943/3 "2021-12-06T16:03:29Z")

</div>

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