# Http node get request with parameter

**URL:** <https://discourse.nodered.org/t/http-node-get-request-with-parameter/90783>\
**Category:** General\
**Created:** [8 September 2024 02:40 UTC](https://discourse.nodered.org/t/http-node-get-request-with-parameter/90783 "2024-09-08T02:40:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wally](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Wally](https://discourse.nodered.org/u/Wally)\
**Post date:** [8 September 2024 02:40 UTC](https://discourse.nodered.org/t/http-node-get-request-with-parameter/90783/1 "2024-09-08T02:40:11Z")

</div>

Hi  
I am using Pushover sending post messages through the http request node which is allowing me to get the receipt parameter of an emergency message from the response. In order to determine if this message has been acknowledged I need to make a get request as outlined below.

Receipts and Callbacks API  
Applications sending emergency-priority notifications will receive a receipt parameter from our API when a notification has been queued. This parameter is a 30 character string containing the character set [A-Za-z0-9]. This receipt can be used to periodically poll our receipts API to get the status of your notification, up to 1 week after your notification has been received.

Submit a GET request (no faster than once every 5 seconds) to:

[https://api.pushover.net/1/receipts/](https://api.pushover.net/1/receipts/)(your receipt).json?token=(your app token)  
Include the receipt in the URL and your application's token as the token parameter. If the receipt is valid, our API will respond with some integer-valued parameters about your notification:

I am not sure if the app token should be appended to the url or if it is somehow included as a separate parameter within the http request. I am sure the app token is correct as it is used to generate the original notifications. Just entering the parameter within the (you app token) space with or without brackets throws an invalid error.  
I just get errors relating to the app token being invalid and I think I must be using the incorrect method.  
It would appear that not many are using the notification acknowledge API as google searches have been fruitless.  
Any guidance would be appreciated.  
Thanks

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [8 September 2024 07:35 UTC](https://discourse.nodered.org/t/http-node-get-request-with-parameter/90783/2 "2024-09-08T07:35:34Z")

</div>

> [@Wally](#):
>
> [https://api.pushover.net/1/receipts/](https://api.pushover.net/1/receipts/)(your receipt).json?token=(your app token)

According to what you have written, the receipt your receive after you send your notification request needs to replace the (your receipt), and the app token needs to replace the (your app token). This can be done in the http request node using Mustache  
e.g.

```auto
https://api.pushover.net/1/receipts/{{{receipt_token}}}.json?token={{{app_token}}}

```

The receipt would be sent to the http request node as `msg.receipt_token` and the app token as `msg.app_token`

Example flow

```auto
[{"id":"b59c78a8881b11f6","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"receipt_token","v":"REC456hgg8krty","vt":"str"},{"p":"app_token","v":"api3654gshsjsjsjjs","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":2840,"wires":[["e31db1a3dc731a6d"]]},{"id":"e31db1a3dc731a6d","type":"http request","z":"d1395164b4eec73e","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://api.pushover.net/1/receipts/{{{receipt_token}}}.json?token={{{app_token}}}","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2840,"wires":[["1b56d180ab143af5"]]},{"id":"1b56d180ab143af5","type":"debug","z":"d1395164b4eec73e","name":"debug 2567","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":490,"y":2840,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![Wally](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Wally](https://discourse.nodered.org/u/Wally)\
**Post date:** [9 September 2024 05:09 UTC](https://discourse.nodered.org/t/http-node-get-request-with-parameter/90783/3 "2024-09-09T05:09:34Z")

</div>

Thanks for a quick response and a perfect solution.  
Just out of interest would you have any idea why receipt which would change with every message is hard coded if thats the right phrase, into the url, but the app token which is reused is appended as a parameter? This is all new to me so thanks again for your assistance.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [9 September 2024 06:01 UTC](https://discourse.nodered.org/t/http-node-get-request-with-parameter/90783/4 "2024-09-09T06:01:06Z")

</div>

> [@Wally](#):
>
> Just out of interest would you have any idea why receipt which would change with every message is hard coded if thats the right phrase, into the url, but the app token which is reused is appended as a parameter?

At a guess, when you send a notification a JSON file is created with the receipt name,. The url is the path to the file and the app token is not part of the path.

---

<div class="post-metadata">

**Author:** ![Wally](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Wally](https://discourse.nodered.org/u/Wally)\
**Post date:** [9 September 2024 06:32 UTC](https://discourse.nodered.org/t/http-node-get-request-with-parameter/90783/5 "2024-09-09T06:32:22Z")

</div>

Makes sense.  
Thanks

---

<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:** [23 September 2024 06:32 UTC](https://discourse.nodered.org/t/http-node-get-request-with-parameter/90783/6 "2024-09-23T06:32:30Z")

</div>

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