Ian E McAllister
Ian E McAllister

Reputation: 211

Adding Mailchimp Webhooks for CiviCRM on Wordpress

I’ve been trouble shooting this all weekend and not finding any solutions. I’m trying to setup webhooks for Mailchimp and CiviCRM 4.6.1 through Wordpress 4.3.1.

The mailchimp settings panel in CiviCRM provides the web hook address as:

Webhook URL - http://<domain>/?page=CiviCRM&q=civicrm/mailchimp/webhook&reset=1&key=2345

Anytime I request the url in a browser window it returns a ‘null’ response. When I paste it into the Mailchimp webhook setup Mailchimp gives me a 403 error (“We couldn't verify the URL is working. Please double check and try again. HTTP Code: 403”).

I’ve tried to ensure that step 3 of the Veda Consulting instructions https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp was handled:

  1. Make sure webhook url is accessible to public. If not, just make sure anonymous / public user has “allow webhook posts” permission.

but in wordpress settings (https://en.support.wordpress.com/webhooks/#what-would-i-use-something-like-this-for) I can’t find a webhook tool. Am I missing something? Is this from an older version of wordpress. I found the Hookpress plugin but it has a warning that it hasn’t been tested with the current version of wordpress.

Whoever can tell me how to get this webhook working for Mailchimp I would greatly appreciate it, thanks!

Upvotes: 1

Views: 1024

Answers (3)

dreadedhamish
dreadedhamish

Reputation: 31

It's a civiCRM setting, not a Wordpress setting. This comment from the developer reveals a URL to use to expose the permissions panel:

You can enable 'allow webhook posts' permission in wordpress access control by navigating to http:///wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&reset=1

Reference: https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp/issues/172#issuecomment-162478431

Upvotes: 1

Chris Burgess
Chris Burgess

Reputation: 3631

If not, just make sure anonymous / public user has “allow webhook posts” permission.

This refers to permissions configuration in your CMS.

  • In Drupal and Backdrop, this is configured under Admin > People > Permissions (admin/people/permissions) where you must grant "allow webhook posts" permission to the "anonymous user" role.
  • In WordPress, a similar pattern should allow you to grant the "allow webhook posts" capability to the "Anonymous User" role.
  • In Joomla, I think the Veda MailChimp plugin doesn't check permissions on that webhook callback.

I had to debug a site which hadn't had this configuration set today, and the HTTP response code for the callback to MailChimp was 500 when permission not granted, and 200 when it was granted. That might help debug your own situation (you should be able to duplicate this simply by GET to the webhook callback).

Upvotes: 0

Ian E McAllister
Ian E McAllister

Reputation: 211

Not a totally satisfying answer but I ran my webhook link through firebug and it always returns an ok 200 response from the server.

I corresponded with Mailchimp and they confirmed that from what they can see there isn't an issue with the webhook I'm using. They suggested I whitelist their API's IP addresses but my hosting doesn't allow whitelist IPs. I've gone back to Mailchimp but it's looking like the fate is sealed on this one.

Upvotes: 0

Related Questions