Error 401 Authorization failed - please check your credentials Wrong format token

HI community, i am trying to connect the API of manychat but it seems i’m having trouble. it’s written 401 code and wrong format token. I’ve tried to add bearer before the api, the result is the same.

Hey @Calvin_Saputra
I am not familiar with manychat API but looks to me you are missing the Bearer prefix in your value, so try setting it to:

Bearer <your-api-token>

If that doesn’t work, please check if it’s expected to send the API token as a request parameter or should you send it in request headers. If it’s the latter, you can use Headers parameter in HTTP node or use Basic HTTP auth to pass your authentication data.

Thank you for replying me
I just added the bearer before the api token, but it seems still giving me the same error 401. I’m quite new in n8n, could you please explain me about what you mean by using headers parameter in http. because it seems like i put the token inside the headers parameter.

You have two ways:

  1. Using the Send Headers option in HTTP node:

  2. Using the Header Auth in HTTP Node (if you want to re-use the token in other nodes):

  • Select Generic Credential Type for Authorization
  • In the next dropdown (Generic Auth Type) select Header Auth
  • In the Header Auth dropdown select Create new
  • Enter your header name and value (probably name: Authorization and value: Bearer <your-token> but please check manychat API docs for that)

Here’s a video, hope it helps :slight_smile:

1 Like

Thank you so much it fixed the problem. glad there is community in here

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