# Setting HTTP Header of get request with HMAC encryption

**URL:** <https://discourse.nodered.org/t/setting-http-header-of-get-request-with-hmac-encryption/7177>\
**Category:** General\
**Created:** [23 January 2019 16:08 UTC](https://discourse.nodered.org/t/setting-http-header-of-get-request-with-hmac-encryption/7177 "2019-01-23T16:08:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathi78](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Mathi78](https://discourse.nodered.org/u/Mathi78)\
**Post date:** [23 January 2019 16:08 UTC](https://discourse.nodered.org/t/setting-http-header-of-get-request-with-hmac-encryption/7177/1 "2019-01-23T16:08:09Z")

</div>

Hello everyone !

I've followed this exemple : [https://cookbook.nodered.org/http/set-request-header](https://cookbook.nodered.org/http/set-request-header)  
to set a http get request.

I got from a running php program 2 parameters :

- id (let's say 123)
- secret ket (let's say 456)

I've set the right url for the get request in the HTTP node (the request works when I use it on the web browser)

When I run the flow I get on my debug node : "{error:"Authorization required."}"

```auto
msg.payload = "data to post";
msg.headers = {};
msg.headers['X-Auth-User'] = '123';
msg.headers['X-Auth-Key'] = '456';
return msg;

```

I'm not sure if I'm using X-Auth-User and X-Auth-Key right ? I've searched on the web and found sometimes X-Auth-Token, X-Auth-Id ... well, I'm lost 😄

In PHP I got one line with CURLOPT\_HTTPHEADER, ["Authorization:api $id:$secret\_key"] ...

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![Mathi78](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Mathi78](https://discourse.nodered.org/u/Mathi78)\
**Post date:** [24 January 2019 10:02 UTC](https://discourse.nodered.org/t/setting-http-header-of-get-request-with-hmac-encryption/7177/2 "2019-01-24T10:02:30Z")

</div>

Well it's solved :

`msg.headers['Authorization'] = 'api 123:456';`
