HTTP Request Authentication w/HMAC-SHA256 - Stuck

Describe the problem/error/question

Hello all! I’m new to n8n - I’ve done Arnold O.’s Udemy course on it, and have dug through a handful of HTTP request tutorials provided both on this site as well as in general, but I’m hitting a hard stop with this issue. I’m trying to connect to a third party API, though I can’t for the life of me get the credentials to go through.

Third party API doc - ReDoc

Thus far, I’ve confirmed that the third party API uses OAuth2 credentials, and have confirmed my API key, API secret, Client ID, and Client secret. I’ve confirmed the Authorization and Access Token URLs are accurate, but when creating a generic OAuth2 credential, hitting the “connect” button opens a 404 window. I’ve confirmed with the third party that everything is working alright on their end. I’ve gone through the API docs repeatedly but haven’t been able to get it to connect; the docs state that I need both an HMAC-SHA256 encryption as well as a RFC3339 Timestamp. I’ve tried passing it through various credential means, via headers, via custom JSON in the body, to no avail. How would I go about fixing up my credentials, and ensuring that everything gets passed through alright? I tried a crypto node for the HMAC, but I’m not 100% sure how to get it set up properly. The template I post below has the HTTP request set most recently, where I cleared out any send headers/send body/etc. . I think the URL is correct, but if it’s supposed to be a different format, that may also be a thing. Any assistance would be greatly appreciated - thank you.

What is the error message (if any)?

Unable to sign without access token (currently)

Previously, I also got a plethora of other errors (mainly 402, I believe), all related to the credential not being set up properly.

Please share your workflow

  • n8n version: [email protected]
  • Database (default: SQLite): default - SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default - own, main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: Windows 11

Hey all, is there anyone whom could point me in the right direction with this? Thank you.

Hey all! Just want to give an update, I was able to find a tutorial out there that took care of it! Yippee! Turns out the main thing is to have an Edit Fields node → Crypto node → HTTP Request node. The signature generated by the crypto node is utilized as the HMAC section of the HTTP request’s Authorization field, when getting that set up. Yippee!! Wahoo!! The link to the tutorial is Integrating APIs with SHA-256 Signatures in N8N (Binance, Cloudinary) · AI Automation Society - Please note that I did not make this tutorial, I just found it online, and I am not affiliated with the website or person or etc. . Posting this so if anybody in the future is hitting the same issue with authenticating using an HMAC-SHA256 in n8n, here you go!

1 Like

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