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.

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