Persistent 401 error connecting to custom webhook

I’m trying to call a custom webhook which continues to respond with 401 not authorised.

It’s a simple scenario, a make.com webhook, custom, set to listen and respond immediately there is data. It has an API key assigned and the webhook URL copies in the standard format:
https://hook.us2.make.com/\[API-KEY MASKED]

In my APP, I generate an API POST call with Authorisation header and payload file as follows. THe API keys match, I read somewhere in help that these webhooks should accept almost any data as long as the API key is matched, not sure why this is not being accepted.

Initiating verification for mike@maximisedai.com

> — Full Request Payload —

> URL: https://hook.us2.make.com/\[API-KEY MASKED]

> Method: POST

> Headers:

> { “Content-Type”: “application/json”, “Authorization”: “Bearer [API-KEY MASKED]” }

> Payload Body:

> { “contacts”: [ { “id”: “d2d53cf4-8bb6-49e2-a199-7f4dfca9e87f”, “email”: “MASKED” } ] }

The error response generated is:

> :cross_mark: API Call Failed: Webhook responded with status 401: Unauthorized.

The incoming POST hits the webhook but gets rejected, the log is below:

Hi @Mike_Robinson,

I think you need to send the API Key in the special Make Authentication headers “x-make-apikey”.
As mentioned in this thread: Call make.com Webhook with authentication via make.com HTTP - #5 by llirik

Maybe that solves it?

Best,
Richard

1 Like

Hi Richard

Thanks for replying, you’re correct of course but I made two errors:

  1. I’ve known about x-make-api but I didn’t read it literally until now, I thought it was shorthand for a format / structure so I had ‘Authorisation’ as my header name instead of x-make-api-key!
  2. I was using the wrong value for API key. I had generated 32 char strings and used them on both ends eg. in my App and in make webhook but as soon as I used the correct make.com token it worked.

Thanks again, 200 status!

1 Like