title: Including a clickable link in sms message using Twilio
body: <p>I have a Twilio number that is setup to execute a webhook when a message is received. I would like to include a link in the response I send back to the user. ie.</p>
  
  <p>Please login to XYZ.com at <a href="https://login.xyz.com/?client=SMS&amp;userid=abc" rel="noreferrer">https://login.xyz.com/?client=SMS&amp;userid=abc</a></p>
  
  <p>However, when i send this in reply I get a schema validation error in the     Twilio debugger with the following message.</p>
  
  <pre><code>Warning - 12200
  
  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.
  </code></pre>
  
  <p>This is the message body:</p>
  
  <pre><code>&lt;Response&gt;
      &lt;Message&gt;Please login to Botler at 'https://login.xyz.com/?client=Twilio&amp;userid=foobar'&lt;/Message&gt;
  &lt;/Response&gt;
  </code></pre>
  
  <p>I tried url encoding the url and I no longer get a schema validation error however the link in the sms is not clickable (it contains all of the escape characters).</p>
  
  <p>How can i send a link in SMS and have it be clickable by the user?</p>
  
  <p>Thanks.</p>
  
  <p><strong>Solution</strong></p>
  
  <p>After much trial and error I found a solution that works. I can wrap the url in CDATA element and it passes schema validation and the link is correctly interpreted by phones.
  For example,</p>
  
  <pre><code>&lt;Response&gt;
      &lt;Message&gt;Please login to Botler at &lt;![CDATA[https://login.xyz.com/?client=Twilio&amp;userid=foobar]]&gt;&lt;/Message&gt;
  &lt;/Response&gt;
  </code></pre>