# GET endpoint for aws4 signature Function works for everything except POST

**URL:** <https://discourse.nodered.org/t/get-endpoint-for-aws4-signature-function-works-for-everything-except-post/63753>\
**Category:** General\
**Tags:** function-node\
**Created:** [10 June 2022 23:43 UTC](https://discourse.nodered.org/t/get-endpoint-for-aws4-signature-function-works-for-everything-except-post/63753 "2022-06-10T23:43:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Landsailor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/landsailor/32/62070_2.png) [@Landsailor](https://discourse.nodered.org/u/Landsailor)\
**Post date:** [10 June 2022 23:43 UTC](https://discourse.nodered.org/t/get-endpoint-for-aws4-signature-function-works-for-everything-except-post/63753/1 "2022-06-10T23:43:04Z")

</div>

Hi there!

I have an API endpoint set up via node-red for the [aws4 signature generator](https://github.com/mhart/aws4) and it works for everything _except_ POST requests. The response from AWS leads me to believe that the aws4 is not getting the body text passed into it correctly (maybe):

 ![POST AWS Signature Error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/0/b0b3399291725ff57b1cefc1909b52d665c51fd1.jpeg)  
I don't know why AWS would say "Hey, I was _expecting_ an unhashed payload here!" when I'm clearly sending one with my request.

I would bet that I'm just missing something important that's keeping it from functioning. I'm passing in all of the data as Queries since it's a GET endpoint:

 ![Screen Shot 2022-06-10 at 4.38.22 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/4965e047b4026d624d5385f501986544ada2f7c2.png)  
However, I am not married to that idea, so if there's a better way, please let me know.

Here's the Function text:

 ![AWS Function Text](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/4/04c90d71737590dfe3d4b066d51a6c05c259e81f.jpeg)

Is it possible that I need to do something involving the JSON converter node? I've only been using node-red for a couple of weeks, so it is entirely possible that I'm missing something very, very basic. This exact request works perfectly in Postman, so it's not an access issue.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Landsailor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/landsailor/32/62070_2.png) [@Landsailor](https://discourse.nodered.org/u/Landsailor)\
**Post date:** [16 June 2022 16:57 UTC](https://discourse.nodered.org/t/get-endpoint-for-aws4-signature-function-works-for-everything-except-post/63753/2 "2022-06-16T16:57:36Z")

</div>

The above response from AWS is incorrect. A script branched incorrectly, so I wasn't actually POSTing any data. Once I fixed that, AWS is now completely denying access. 🙂

It still works perfectly for GET and DELETE.

---

<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:** [15 August 2022 16:58 UTC](https://discourse.nodered.org/t/get-endpoint-for-aws4-signature-function-works-for-everything-except-post/63753/3 "2022-08-15T16:58:08Z")

</div>

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