Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now


Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Twilio Client JavaScript SDK 1.1 & 1.2 Migration Guide

If you are currently using Twilio Client JavaScript SDK 1.1 or 1.2, this guide will walk you through the steps to upgrade to version 1.7 which is our latest Twilio Client JavaScript SDK.

On February 14, 2018, Twilio Client 1.1 & 1.2 will reach their end of life and will no longer be supported. At the end of life date you can expect the following:

  • The JavaScript library will no longer be served from our CDN.
  • Connections made with the deprecated library will be refused.
  • Twilio Support will no longer address questions on deprecated libraries.

Our new Twilio Client JavaScript SDK 1.7 library’s core calling functionality is backward compatible but there are important aspects you need to take into consideration. Below is a detailed step-by-step guide that helps you migrate to our latest version.

Step 1: Determine if you are using Twilio Presence or Device Sounds

Twilio Presence and Device sounds are deprecated functionality included in old versions of Twilio Client JavaScript SDK. This functionality is fully deprecated and not supported anymore.

To find if you are using Twilio Presence or Device Sounds, search your code for:


If you do not use Twilio Presence or Device, then advance to Step 2.

If you do use Twilio Presence or Device Sounds, read on:

If you are using Twilio.Device.sounds, note that this functionality still exists but has been moved onto the AudioHelper object on Twilio.Device.audio. Any references to Twilio.Device.sounds.incoming, Twilio.Device.sounds.outgoing or Twilio.Device.sounds.disconnect should be updated to Twilio.Device.audio.incoming, Twilio.Device.audio.outgoing and Twilio.Device.audio.disconnect, respectively.

If you are using Twilio.Device.presence, it is important to note that this functionality is not currently supported and will stop working on February 14, 2018. It is also important to note that Twilio Presence is not required to make or receive calls to and from the Twilio Client JavaScript SDK.

There are two approaches you can take to manage presence:

1) Manage agent presence with Task Router.

If you are using Twilio Presence to manage contact center agent presence, we recommend TaskRouter to manage agent state and call distribution.

You can get started with TaskRouter here: https://www.twilio.com/docs/api/taskrouter

1) Manage user presence with Twilio Sync.

If you are using presence to manage 'Buddy lists' we recommend using Twilio Sync, our new state synchronization product that you can use to manage endpoint state (i.e. Presence) across devices.
You can get started with Twilio Sync here: https://www.twilio.com/docs/api/sync

Step 2: Determine if you are using old browser versions

Our new Twilio Client JavaScript SDKs are entirely based on WebRTC, which is the standard for browser-based communications. WebRTC is now supported on all major browsers - Chrome, Safari, Firefox, Microsoft Edge and Opera.

Older browsers (Safari < 11 and Internet Explorer) on the market do not support WebRTC and the new versions of Twilio Client JavaScript SDK do not support Adobe Flash which was the technology used to be able to make calls from old browsers.

Making calls through Flash results in a poor user experience. Therefore it is not something we recommend. So with better technologies available (WebRTC), we are not supporting Flash going forward.

What browser versions support WebRTC?

For the latest WebRTC browser compatibility see: http://caniuse.com/#search=webrtc

If your browser does support WebRTC, go to Step 3.

If you are currently using a non-WebRTC supported browser you need to make sure your browsers are updated to the latest version or a WebRTC supported version.
Specifically for the case of Internet Explorer please follow Microsoft's recommendation to upgrade to Microsoft Edge.

Step 3: Upgrade the JavaScript.

In this case, upgrading to the latest version of the Twilio Client JavaScript SDK 1.7 is extremely easy. You have to include the new version of the JavaScript library as described below:

Include the following script in the <head> tag of your web page.

Twilio.js ライブラリのインクルード

HTML の <head> の中に、twilio.js ライブラリをインクルードします。

<script type="text/javascript"

ユーザーのページに接続するには、HTTPS を使用する必要があります。Google Chrome 47 以降は、HTTP アプリケーションで getUserMedia() を呼び出すことが許可されなくなるため、ユーザーのカメラやマイクへのアクセス権は付与されません。

Make sure to search your code to find any other instances where the old libraries are used, update them and you are good to go.

Rate this page:


誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。