Can't receive http post request

I’ve set up a Mailchimp webhook, which sends a post request everytime a campaign is sent. The problem is, I can’t get my action to receive the post request. On initial setup of the webhook, Mailchimp sends a get request to validate the url. I can receive the get request just fine, but not the post request when the send campaign event is triggered. I’m using RequestBin and I can see that the webhook is functioning correctly and posting the requested data. Why won’t my application receive it? It’s running on Apache/Ubuntu server, and I’ve read several Apache forums which state that nothing special is required to receive http post requests. I’ve verified that I’m not blocking it in .htaccess. Any ideas what might be blocking it?

I would suggest you investigate the logs and inspect where in the pipeline your request is being dropped, maybe its hitting an endpoint which is not registered as a yii route so check nginx logs as well as app logs under runtime/logs/app.log

Did you check/disable CSRF?

https://yii2-cookbook.readthedocs.io/csrf/

CSRF was not disabled for the action, but it is now. :slight_smile:

It’s still not working. There’s nothing recent (from the last day of testing) in the runtime app.log. I’m checking into how to view request logs on Apache.

It’s fixed! I didn’t have the error logging configured properly. I found a simple error in the action. The solution was a combination of CSRF and detecting the error. Thanks to both of you!