Answers.Body: <p>WordPress does not require that a role be given to users who only visit your site (e.g. to read posts) so long as it is public - roles are only required when logging in. However, for a WordPress client using the MailChimp sync, we found that we needed to create an Anonymous User role with the webhook permissions assigned - once you do this, pasting the webhook in MailChimp should no longer result in an error. </p>
  
  <p>To clarify, no one has to be assigned the Anonymous User role for this to work.</p>
  
  <p>Hope this helps!
  Tamar</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-13T20:25:11.687Z
Answers.LastActivityDate: 2018-11-13T20:31:28.027Z
Answers.LastEditDate: 2018-11-13T20:31:28.027Z
Answers.UserDisplayName: Tamar Meir - Cividesk
Body: <p>I'm trying to set up <a href="https://civicrm.org/extensions/mailchimp-civicrm-integration" rel="nofollow noreferrer">this Mailchimp extension for CiviCRM</a>, but I got this error : </p>
  
  <p><a href="https://i.sstatic.net/MUrqt.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MUrqt.jpg" alt="mailchimp error"></a></p>
  
  <p>So I tried to create a new webhook in Mailchimp, but when I copy-paste the webhook URL that CiviCRM gave me ( <code>https://www.mywebsite.org/civicrm?page=CiviCRM&amp;q=civicrm/mailchimp/webhook&amp;reset=1&amp;key=xxxxxxxx</code> ) I got this message in Mailchimp : </p>
  
  <blockquote>
    <p>We couldn't verify the URL is working. Please double check and try again. HTTP Code: 500</p>
  </blockquote>
  
  <p>I tested this link in my browser and it seems to work when I am connected to my Wordpress site, and it displays an error 500 when I am not connected.</p>
  
  <p>So I thought that this problem could be solved by changing the permission for anonymous users in <strong>WordPress Access Control</strong> ( <code>civicrm/admin/access/wp-permissions</code> ) but the only users displayed on the list are :</p>
  
  <ul>
  <li>Editor</li>
  <li>Author</li>
  <li>Contributor</li>
  <li>Subscriber</li>
  <li>Civicrm editor</li>
  <li>SEO Manager</li>
  <li>SEO Editor</li>
  </ul>
  
  <p>This "anonymous user" role doesn't exist and even if I check all permission boxes for all users in the "<code>Mailchimp: allow webhook posts</code>" line , the link always returns an error 500.</p>
  
  <p>What can I do to make this URL working ?</p>
  
  <p>Thanks for any help!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-15T13:26:22.320Z
Comments.Text: Have you tried a urlencoded version of your webhook URL? It's possible that the WordPress `redirect_canonical()` function is causing a redirect to a properly-formatted URL before CiviCRM has a chance to receive the payload.
  
  EDIT: by which I mean the URL should look like `https://www.mywebsite.org/civicrm?page=CiviCRM&q=civicrm%2Fmailchimp%2Fwebhook&reset=1&key=xxxxxxxx`
Comments.UserDisplayName: Christian Wach
Tags: <wordpress><roles><mailchimp>
Title: How to make the callback URL from Mailchimp accessible from anonymous users in Wordpress?
ThreadText: # How to make the callback URL from Mailchimp accessible from anonymous users in Wordpress?
  
  (Asked by: username_0 on 2018-11-12)
  
  I'm trying to set up [this Mailchimp extension for CiviCRM](https://civicrm.org/extensions/mailchimp-civicrm-integration), but I got this error :
  
  [![mailchimp error](https://i.sstatic.net/MUrqt.jpg)](https://i.sstatic.net/MUrqt.jpg)
  
  So I tried to create a new webhook in Mailchimp, but when I copy-paste the webhook URL that CiviCRM gave me ( `https://www.mywebsite.org/civicrm?page=CiviCRM&q=civicrm/mailchimp/webhook&reset=1&key=xxxxxxxx` ) I got this message in Mailchimp :
  
  > We couldn't verify the URL is working. Please double check and try again. HTTP Code: 500
  
  I tested this link in my browser and it seems to work when I am connected to my Wordpress site, and it displays an error 500 when I am not connected.
  
  So I thought that this problem could be solved by changing the permission for anonymous users in **WordPress Access Control** ( `civicrm/admin/access/wp-permissions` ) but the only users displayed on the list are :
  
  * Editor
  * Author
  * Contributor
  * Subscriber
  * Civicrm editor
  * SEO Manager
  * SEO Editor
  
  This "anonymous user" role doesn't exist and even if I check all permission boxes for all users in the "`Mailchimp: allow webhook posts`" line , the link always returns an error 500.
  
  What can I do to make this URL working ?
  
  Thanks for any help!
  
  **Tags:** wordpress, roles, mailchimp
  
  > **Comments:**
  > **username_1**: Have you tried a urlencoded version of your webhook URL? It's possible that the WordPress `redirect_canonical()` function is causing a redirect to a properly-formatted URL before CiviCRM has a chance to receive the payload.  EDIT: by which I mean the URL should look like `https://www.mywebsite.org/civicrm?page=CiviCRM&q=civicrm%2Fmailchimp%2Fwebhook&reset=1&key=xxxxxxxx`  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-11-13. Score: 2
  
  WordPress does not require that a role be given to users who only visit your site (e.g. to read posts) so long as it is public - roles are only required when logging in. However, for a WordPress client using the MailChimp sync, we found that we needed to create an Anonymous User role with the webhook permissions assigned - once you do this, pasting the webhook in MailChimp should no longer result in an error.
  
  To clarify, no one has to be assigned the Anonymous User role for this to work.
  
  Hope this helps!
  Tamar
  
  
  ---
  
  