Webhook response in Mailgun returns a forbidden code

135 views Asked by At

I have configured a test web hook in Mailgun to send to PipeDream RequestBin. When I test the web hook it works fine, gives a response, gets 200 back.

I have now changed the endpoint to be my own PHP website (written in Laravel 10, but not using the default Mailgun Laravel system). At this point the web hook is pointing to a URL that is setup as a 'POST' in web routing, that sends it to a controller that should do nothing but return an HTTP 200 Status. I have included the URL in the CSRF exclusion array in middleware.

If I 'POST' data from another page, it works fine. If I test the web hook I am getting the following response on the Mailgun web hook test page:

Response: <html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>

I am assuming the above 403 response is coming back from my server, but I cannot understand why. Can anyone tell me what I am missing please, or point me in the right direction? I have been playing with this for the past five hours and getting no where.

0

There are 0 answers