# Authentication for api's

**URL:** <https://discourse.nodered.org/t/authentication-for-apis/9216>\
**Category:** General\
**Created:** [20 March 2019 07:32 UTC](https://discourse.nodered.org/t/authentication-for-apis/9216 "2019-03-20T07:32:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akhilendharreddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/akhilendharreddy/32/6953_2.png) [@akhilendharreddy](https://discourse.nodered.org/u/akhilendharreddy)\
**Post date:** [20 March 2019 07:32 UTC](https://discourse.nodered.org/t/authentication-for-apis/9216/1 "2019-03-20T07:32:23Z")

</div>

Hi, I am trying to expose some endpoints (api) for this I want to add authentication, I can able to add bais auth by enabling httpNodeAuth in the settings.js file but I want to pass authorization(access\_token) in the header which I usually get from auth/token this endpoint, how can do this?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 March 2019 07:51 UTC](https://discourse.nodered.org/t/authentication-for-apis/9216/2 "2019-03-20T07:51:54Z")

</div>

You want to send or receive information in the http headers?

If you wish to send see the cookbook. [https://cookbook.nodered.org](https://cookbook.nodered.org) where there’s an example.

If you wish to receive they are included in the msg object. Add a debug node set to display complete message.

---

<div class="post-metadata">

**Author:** ![akhilendharreddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/akhilendharreddy/32/6953_2.png) [@akhilendharreddy](https://discourse.nodered.org/u/akhilendharreddy)\
**Post date:** [20 March 2019 07:57 UTC](https://discourse.nodered.org/t/authentication-for-apis/9216/3 "2019-03-20T07:57:58Z")

</div>

@ukmoose I want to pass Authorization in header,

example: i have two apis localhost:1880/auth/token - here i am getting access\_token, this token i want to pass as Authorization for localhost:1880/hello this get api
