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.

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free