title: Send ics File from Twilio for Whatsapp REST API
body: <p>I need to send a Calendar file (ICS) from the REST Api but i can`t.</p>
  
  <p>Nevertheless, I could send a jpg file. In <a href="https://www.twilio.com/blog/whatsapp-media-support" rel="nofollow noreferrer">this</a>  article Twilio staff announced that users can send 
   <strong><em>images and videos, but also PDFs, text files, and audio files using the Twilio API for WhatsApp.</em></strong></p>
  
  <p>This is my call with JPG file that attach the media in a whatsapp message OK:</p>
  
  <pre><code>curl -X POST \
  https://api.twilio.com/2010-04-01/Accounts/ACYYYYYYYYYYYYYYYYY/Messages.json \
  -H 'authorization: Basic 
  XXXXXXXXXXXXX' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -H 'postman-token: 58fa6aca-3b92-66d4-f675-9906bed37302' \
  -d 'To=whatsapp%3A%2BXXXXXXXX&amp;From=whatsapp%3A%2BYYYYYYY&amp;Body=Hola%20probando2&amp;MediaUrl=https%3A%2F%2Flh4.googleusercontent.com%2F-nbafRpNzZAc%2FWjHLp8y3NOI%2FAAAAAAAAAAA%2Fc8CSoPlcgcAazvZFKSU3uYxwo3HZ7FVewCOQCEAE%2Fs128-c-k%2Fphoto.jpg%0A'
  </code></pre>
  
  <p>When i substitute MediaUrl path with a txt file path or ics file, the message wasn't attach the file:</p>
  
  <p>for example something like this: </p>
  
  <pre><code>curl -X POST \
  https://api.twilio.com/2010-04-01/Accounts/ACYYYYYYYYYYYYYYYYY/Messages.json \
  -H 'authorization: Basic 
  XXXXXXXXXXXXX' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -H 'postman-token: 58fa6aca-3b92-66d4-f675-9906bed37302' \
  -d 'To=whatsapp%3A%2BXXXXXXXX&amp;From=whatsapp%3A%2BYYYYYYY&amp;Body=Hola%20probando2&amp;MediaUrl=https:%2F%2Faaa.bbb.com%2Fccc%2Fcalendar.ics%0A'
  </code></pre>