Hello everyone!
First time poster here. I’m trying to make a API call that requires HMAC SHA 256 encoding. When I use Postman I’m able to make the request but when I use the same information in n8n, I’m unable to make the call, I’m getting 403 errors because of signature issues.
The call is being made to NetSuite. As per their requirements, I’m supposed to generate a signature using specific parameters including a Timestamp. I think my issue is that the Timestamp is being generated in the second node of the workflow called Timestamp, and it is being referenced in the Crypto and HTTP nodes. In other words, there is a lag or time passes by after the timestamp is created in the Timestamp node. I’m not creating the timestamp inside the Crypto node because I need to use the same timestamp in the HTTP request again and I noticed if I create two timestamps (one in the crypto node and one in the HTTP node) I will see different amounts/numbers as timestamps because time passes by betwen the nodes executions.
This is the function I’m using in the Timestamp node {{ $now.toFormat(‘X’) }}. Ideally, I would have the ability to produce the signature inside the HTTP node but I haven’t found a way to SHA 256 encode strings without using the crypto node. I think if I generate the signature inside the HTTP node then the two timestampts (the one generated for signature and the one used in the HTTP header) would be the same and the timestamp will match the call’s timing.
Those this make sense? I’m an accountant that plays a little with APIs, so the Timestamp issue might not be a real issue. Hoping it is because I cannot find anything else wrong with my calls. Any help will be greatly appreciated. Thanks!
Runnning on n8n cloud on a windows laptop, [email protected], database = NetSuite