Error: 400 "Invalid Authorization" when calling Volcengine/Jimeng Visual API in n8n HTTP Request node


Hi everyone,

I’m trying to integrate the Volcengine/Jimeng Visual API (CVSync2AsyncSubmitTask endpoint) into my n8n workflow, but I keep getting a 400 Bad Request with the error: "Invalid 'Authorization' header, Pls check your authorization header".

Here is my setup:

  • Node: HTTP Request

  • Method: POST

  • URL: https://visual.volcengineapi.com/?Action=CVSync2AsyncSubmitTask&Version=2022-08-31

  • Authentication: I am using Predefined Credential TypeJimeng API Credentials API.

  • Headers: Content-Type: application/json

What I’ve tried:

  1. I verified that my Access Key and Secret Key are correct in the Jimeng credentials.

  2. I tried adding Action and Version as query parameters in the URL.

  3. I checked the Volcengine documentation, which seems to imply that this specific asynchronous task interface requires an HMAC-SHA256 signature, but I’m unsure how to implement that inside n8n’s standard HTTP Request node.

My Questions:

  1. Is the Jimeng API Credentials node supposed to handle the HMAC-SHA256 signature automatically for this specific visual API?

  2. If not, what is the best practice to generate the signature in n8n? Should I use a Code node to compute the signature before the HTTP Request node?

  3. Is there a simpler way to call this API without manually calculating the signature?

Any guidance or a code snippet for generating the signature would be greatly appreciated!

Hi @city Welcome!
I guess you should try generating the hash of the signature using the crypto node in HMAC → SHA256, and then pass the resulting signature into the Authorization header of your HTTP request node, although this should work but if you want you can also use code node with crypto lib to generate that, let me know if that works.

I’ve switched to another platform that also meets my needs, but it doesn’t require the step of generating a signature. It has already solved my problem. Thank you for your answer; I will try your method when I have time. Thank you very much!

1 Like