Webhook returning 401 authentication error

I've never worked with webhooks but have followed the PHP wrapper sample. I have been able to implement create, activate, get, etc. However, when attempting a test, I am getting back an unauthorized response.
Server Error. 401 - Unauthorized: Access is denied due to invalid credentials.

    [coode] => 610
    [Message] => The webhook request has failed
    [ResultData] => stdClass Object
            [FailureStatus] => ProtocolError
            [FailureResponseMessage] => Unauthorized
            [FailureResponseCode] => 401
            [FailureResponse] =>

The URL I am POSTing to is behind our CMS authentication. Please advise on how I can receive the POST in this situation. I assume this is a common occurrence.


Phil Phil, 2 years ago

Hi drpudding,

The short answer is that we are unable to call into webhooks which are protected by some kind of password scheme, whether it's cookie-based, or even using HTTP basic auth.

The webhook endpoint will need to be publicly accessible. From a security perspective, you can lock it down to only accept POSTs from our range of IP addresses:

Hope that helps :)

drpudding, 2 years ago

Thanks, Phil. That should work for me.

Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free