Answers.Body: <p>The callback path shown in your Twilio debug is</p>
  
  <pre><code>/civicrm/sms/callback?provider=org.civicrm.sms.twilio
  </code></pre>
  
  <p>For WordPress, this needs to be</p>
  
  <pre><code>/?page=CiviCRM&amp;q=civicrm%2Fsms%2Fcallback&amp;provider=org.civicrm.sms.twilio
  </code></pre>
  
  <p>The former is suitable for Drupal CMS, but won't work in WordPress CMS. WordPress paths for CiviCRM callbacks are generally <code>/?page=CiviCRM&amp;q=civicrm/callback/here</code></p>
  
  <p>Per <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Setting+up+a+SMS+Provider+for+CiviSMS" rel="nofollow noreferrer">wiki: Setting up a SMS Provider for CiviSMS</a>, the callback URL to use for Twilio/WordPress seems to be:</p>
  
  <pre><code>https://www.example.org/?page=CiviCRM&amp;q=civicrm%2Fsms%2Fcallback&amp;provider=org.civicrm.sms.twilio
  </code></pre>
  
  <p>Try adjusting the settings for callback over on Twilio and see if that fixes it?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-19T09:21:58.780Z
Answers.Text: Thanks, Chris.  You've helped me go in the right direction, but of course I'm still having problems.  I'm getting another error: `Warning: 12200 Schema validation warning.  Message: Cvc-elt.1: Cannot find the declaration of element 'html’.`  Here is the full error report: http://www.cellpoems.org/TwilioErrorLog.pdf  In Twilio’s debugging tool, it says:
  
  **Schema validation warning**  
  The provided XML does not conform to the Twilio Markup XML schema. Please refer to the specific error and correct the problem.
Answers.UserDisplayName: CDS-Delano
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-20T05:14:14.727Z
Answers.Text: I'd look at permissions etc - looks like Twilio is seeing a WordPress themed page rather than the expected XML result when it requests your callback URL. AFAICT, not enough information in the debug output. Check the [HTTP response code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) in webserver logs, it may provide a clue (500 versus 401 might suggest application error or lack of permissions, etc). From there, I might capture the variables submitted in a request, and the URL Twilio hit, then generate a matching request using `curl` or PHP and replay that request to debug further.
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-18T21:13:17.777Z
Answers.LastActivityDate: 2017-01-18T22:15:47.263Z
Answers.LastEditDate: 2017-01-18T22:15:47.263Z
Answers.UserDisplayName: Chris Burgess
Body: <p>I'm really enjoying CiviCRM (recently upgraded to 4.7.13) and was excited about its SMS capabilities. So far, I have been successful in using CiviSMS with Twilio to schedule/send bulk messages. </p>
  
  <p><strong>But, I cannot yet receive inbound SMS responses in CiviCRM with Twilio.</strong> For example, if someone responds to one of our messages, it does not show up as an Activity in CiviCRM.</p>
  
  <p>I followed the instructions for setting up Twilio for inbound SMS, but no inbound SMS arrived in CiviCRM.</p>
  
  <p>Here's my configuration of Twilio in CiviCRM:</p>
  
  <p><a href="https://i.sstatic.net/4IS1E.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4IS1E.png" alt="enter image description here"></a></p>
  
  <p>In my Twilio logs, you can see my configuration as well as the report on how the HTTP POST is running into a 404 error. <a href="http://www.cellpoems.org/misc/Twilio%20-%20SMS%20Logs.pdf" rel="nofollow noreferrer">Here is the detailed error log from Twilio</a></p>
  
  <p>I've done a number of things to try and fix this--I disabled security plugins, played around with case of the API info entered in CiviCRM.. and now I've started to look at the htaccess files and permissions. But this kind of tinkering is out of my league, so am stopping before I do any damage.</p>
  
  <p>So, I could use any advice y'all could provide. </p>
  
  <p>Thanks!
  Chris</p>
  
Tags: <wordpress><api><sms><civisms>
Title: Inbound SMS from Twilio not showing up in CiviCRM (getting 404 error on HTTP POST)
ThreadText: # Inbound SMS from Twilio not showing up in CiviCRM (getting 404 error on HTTP POST)
  
  (Asked by: username_0 on 2017-01-18)
  
  I'm really enjoying CiviCRM (recently upgraded to 4.7.13) and was excited about its SMS capabilities. So far, I have been successful in using CiviSMS with Twilio to schedule/send bulk messages.
  
  **But, I cannot yet receive inbound SMS responses in CiviCRM with Twilio.** For example, if someone responds to one of our messages, it does not show up as an Activity in CiviCRM.
  
  I followed the instructions for setting up Twilio for inbound SMS, but no inbound SMS arrived in CiviCRM.
  
  Here's my configuration of Twilio in CiviCRM:
  
  [![enter image description here](https://i.sstatic.net/4IS1E.png)](https://i.sstatic.net/4IS1E.png)
  
  In my Twilio logs, you can see my configuration as well as the report on how the HTTP POST is running into a 404 error. [Here is the detailed error log from Twilio](http://www.cellpoems.org/misc/Twilio%20-%20SMS%20Logs.pdf)
  
  I've done a number of things to try and fix this--I disabled security plugins, played around with case of the API info entered in CiviCRM.. and now I've started to look at the htaccess files and permissions. But this kind of tinkering is out of my league, so am stopping before I do any damage.
  
  So, I could use any advice y'all could provide.
  
  Thanks!
  username_1
  
  **Tags:** wordpress, api, sms, civisms
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-18. Score: 3
  
  The callback path shown in your Twilio debug is
  
  ```
  /civicrm/sms/callback?provider=org.civicrm.sms.twilio
  
  ```
  
  For WordPress, this needs to be
  
  ```
  /?page=CiviCRM&q=civicrm%2Fsms%2Fcallback&provider=org.civicrm.sms.twilio
  
  ```
  
  The former is suitable for Drupal CMS, but won't work in WordPress CMS. WordPress paths for CiviCRM callbacks are generally `/?page=CiviCRM&q=civicrm/callback/here`
  
  Per [wiki: Setting up a SMS Provider for CiviSMS](https://wiki.civicrm.org/confluence/display/CRMDOC/Setting+up+a+SMS+Provider+for+CiviSMS), the callback URL to use for Twilio/WordPress seems to be:
  
  ```
  https://www.example.org/?page=CiviCRM&q=civicrm%2Fsms%2Fcallback&provider=org.civicrm.sms.twilio
  
  ```
  
  Try adjusting the settings for callback over on Twilio and see if that fixes it?
  
  > **Comments:**
  > **username_0**: Thanks, username_1.  You've helped me go in the right direction, but of course I'm still having problems.  I'm getting another error: `Warning: 12200 Schema validation warning.  Message: Cvc-elt.1: Cannot find the declaration of element 'html’.`  Here is the full error report: http://www.cellpoems.org/TwilioErrorLog.pdf  In Twilio’s debugging tool, it says:  **Schema validation warning**   The provided XML does not conform to the Twilio Markup XML schema. Please refer to the specific error and correct the problem.  
  > **username_1**: I'd look at permissions etc - looks like Twilio is seeing a WordPress themed page rather than the expected XML result when it requests your callback URL. AFAICT, not enough information in the debug output. Check the [HTTP response code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) in webserver logs, it may provide a clue (500 versus 401 might suggest application error or lack of permissions, etc). From there, I might capture the variables submitted in a request, and the URL Twilio hit, then generate a matching request using `curl` or PHP and replay that request to debug further.  
  
  ---
  
  