1

I am integrating with mailchimp APi using their wrapper class. I have configured the webhook in my mailchimp dashboard and the file which will get webhook response has this on top

 if(isset($_POST['type'])){
 $yes=$_POST['data']['email'];

 $querynewsubscrip="INSERT into newslettersubscrips SET optemail='$yes'";
 $resultnewsubscripxx=mysql_query($querynewsubscrip) or die('Query failed: ' .  mysql_error());

 }

Is this what i need to catch the response from Mailchimp? What i assume is, webhooks send me data through post, type tells me what was the action and data array has all the data. Please guide

1 Answer 1

2

Mailchimp have a guide here: http://apidocs.mailchimp.com/webhooks/downloads/#php And some example code here: http://apidocs.mailchimp.com/webhooks/downloads/webhooks.phps

That should explain what you need to do.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.