Why are my requests to api.twilio.com failing certificate validation?

Twilio, like every web provider, periodically updates our SSL certificates.  Doing so is generally not a problem as most HTTP libraries fetch the latest certificates before sending requests to Twilio.

In some rare instances it can be the case that customers are manually using Twilio’s certificates to make HTTP requests or were using outdated request libraries.  In these instances the update of Twilio’s certificates can cause request failures.

If this occurs we recommend the following updates to your application:

  1. Quick Patch:  Replace the contents of your current certificate with  https://raw.githubusercontent.com/twilio/twilio-php/master/Services/cacert.pem.  This should be considered a temporary workaround since a new certificate issued in the future which will cause this to break again.
  2. Full Fix:  This process requires you to upgrade your Twilio helper library, and all dependencies such as cURL, openSSL, httplib2 or depending on language/framework to the most recent versions. If your hosting services does not allow you to update these libraries yourself please contact your hosting provider or consider moving to an alternative host

You can download the latest version of Twilio’s official helper libraries at  https://github.com/twilio