How to fetch webhook payload?

I'm using PHP to create a system that will fetch webhook payload when someone is unsubscribing newsletters, but I can figure out how to fetch the actual payload information in PHP.

Is there any POST data to fetch? How does PHP look for this POST data?

tobyb tobyb, 5 years ago

Hey ronnieandre,

The PHP wrapper includes some sample code doing exactly this. It relies on the rest of the wrapper being present and assumes the webhook data is JSON but it should at least get you started.


ronnyandre, 5 years ago

Thanks for your answer Toby!

Can't believe I missed that. Actually found another solution for it as well, by using the following variable:


Note that it requires the HTTP PECL extension.

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free