2.x Changelog

Getting Started? Go for Programmable Chat SDK 4.x for Javascript

If you are starting out with Twilio’s Programmable Chat SDK for Javascript, we highly recommend starting with version 4.x. Version 4.x is our latest SDK and it brings many new features and improvements to the 1.x and 2.x versions. And it will be much easier to migrate to Twilio Conversations.

Support for 2.x ceased 5/18/2019

Not using 4.x? You should migrate ASAP

If you are already using 2.x, we highly recommend planning your migration to 4.x as soon as possible.

End-of-Life for 1.x occured on June 30, 2019.

Programmable Chat 2.2.0 (March 13, 2018)


  • Added method Client.unsetPushRegistrationId to deregister from push notifications
  • Added lastMessage structure to Channel
  • Added helper method Client.getLocalChannels to get (sorted) locally known channels, sorting is possible by uniqueName, friendlyName, or lastMessage


  • Fixed re-using of ClientOptions between two clients creations in the same browser or node.js session
  • Various updates and fixes for documentation

Programmable Chat 2.1.0 (January 15, 2018)


  • For Message with type media the body property now is null (instead of placeholder about unsupported media messaging)
  • Adjusting Client#connectionStateChanged event: adding disconnected and disconnecting states


  • Fixed race in session initialization
  • Various updates and fixes for documentation

Programmable Chat 2.0.1 (December 19, 2017)


This release is identical to 2.0.0. The sole purpose is to publish the new version to npmjs.com.

Programmable Chat 2.0.0 (December 1, 2017)


Removed deprecated Client constructor and Client.initialize function, the correct way now is to use static function Client.create. Behavioral breaking change in adding Member and joining Channel, now if User is already in the Channel, then Channel.add and Channel.join will throw SessionError. Changed function signature in Consumption Horizon functions, after successful setting of last message consumed these functions returns unread messages count in given Channel for logged in User.


  • Channel.add and Channel.join functions will throw an SessionError in case of User already exists in the Channel
  • Consumption horizon functions now returns Promise<number> with count of unread messages in the channel after the operation:
    • Channel.advanceLastConsumedMessageIndex
    • Channel.updateLastConsumedMessageIndex
    • Channel.setAllMessagesConsumed
    • Channel.setNoMessagesConsumed

Removed deprecated functions

  • Client constructor
  • Client.initialize 関数


  • Client.version property now correctly displays Client's version
  • Fixed getting next page of Channel's User Descriptors after calling Channel.getUserDescriptors

Programmable Chat 1.2.1 (October 12, 2017)


  • Fixed incorrect handling of network timeouts in React Native
  • Fixed session errors handling

Programmable Chat 1.2.0 (September 18, 2017)


  • Added Multimedia Messaging (beta) API (see * Media Support for more information) . Note Sending media messages on existing instances requires adding a new permission in your channel roles.
  • In Channel.sendMessage method you can provide FormData (for browsers) or SendMediaOptions (browsers and node.js apps) to send media from your client
  • Message class is extended with type attribute
  • Message class is extended with media attribute which holds Media class instance
  • Role should contain Channel level sendMediaMessage permission for users to be able to send Media Messages

Programmable Chat 1.1.2 (August 22, 2017)


  • Fixed a big in client creation which caused the operation to fail in rare cases

Programmable Chat 1.1.1 (August 16, 2017)


  • Added PushNotification interface for push notification representation
  • Added Client#event:pushNotification event
  • Added static method Client.parsePushNotification to handle push payload and return the PushNotification instance back to client (intended use is Firebase service worker)


  • Fixed unhandled promise rejections on new client creation in some rare cases
  • SDK Reference Documentation fixes and updates

Programmable Chat 1.0.4 (July 14, 2017)


  • Fixed additional issues related to Channel and ChannelDescriptor status updates not behaving as expected (which were not addressed in the 1.0.3 release)

Programmable Chat 1.0.3 (July 12, 2017)


  • Fixed issues related to Channel status and uniqueName updates not behaving as expected
  • SDK Reference Documentation fixes and updates

Programmable Chat 1.0.2 (July 4, 2017)


  • Improvements made to the reliability of retrieval of Channel and User Descriptors


  • Fix for clients with identities containing spaces / pluses / etc. during fetching Channel Descriptors
  • Fix for object properties accessors in User, Member, Channel, Message
  • Documentation fixes

Programmable Chat 1.0.1 (2017年5月19日)


  • SDK Chat Clientインスタンスの作成、特に作成済みではあるが完全に初期化されていないクライアントの使用における問題に対処するため新しいファクトリーメソッドが追加されました。 これまであった手動でのコンストラクターはdeprecated(廃止予定)となった点に留意してください。


  • Fixed a rare issue whereby the client did not correctly initialize. This caused the typing indicator feature not to work correctly
  • 現在 client init ではないメッセージ(つまり、client init後に追加さしていない)に対してmessageRemovedイベントが正しく発生しない不具合を修正しました。
  • JSライブラリーのReact Nativeとの親和性が向上しました。
  • さまざまなドキュメントの修正

Programmable Chat 1.0.0 (2017年5月2日)

With this release, Programmable Chat is now in GA. A number of breaking changes were introduced as part of the GA release. To see what has changed and to migrate from the latest Beta SDK to the new GA SDK, please read the * GA Migration Guide for JavaScript.


クライアントの初期化が、大多数のユーザーの典型的なシステムの使用方法を反映して単純化されました。 全ユーザーチャネル(現在のユーザーが参加している、あるいはオーナーであるチャネル)はクライアントの起動時から購読されますが、最初はメンバーの一覧のみが同期されます。 これにより迅速な起動を維持しつつ、クライアントに最新のアクティビティーが反映されます。

UserInfo は廃止予定となり、2つの個別のクラス、UserおよびUserDescriptorに置き換えられました。 ChannelDescriptorクラス同様、UserDescriptorは取得後に直接使用されるべきではあるが、一方で時間の経過とともにデータが更新されないため保持されない、その時点でのデータのスナップショットを表します。

サイズの大きいインスタンスでのパフォーマンスを向上させるため、ユーザーは暗黙的に購読されなくなりました。 少なくとも最近購読されていたユーザーが購読を取りやめたあと、同時に最大100までのユーザーを購読できます。


  • 削除
    • Client.getPublicChannels() 関数
    • Client.getUserChannels() 関数
    • Client#event:userInfoUpdated イベント
    • Member.userInfo プロパティ
    • Member#event:userInfoUpdated イベント
    • UserInfo クラス
  • 追加されました
    • Channel.getUserDescriptors() 関数
    • ChannelDescriptor.isPrivate プロパティ
    • ChannelDescriptor.lastConsumedMessageIndex プロパティ
    • ChannelDescriptor.status プロパティ
    • ChannelDescriptor.type プロパティ
    • Client.getPublicChannelDescriptors() 関数
    • Client.getSubscribedChannels() 関数
    • Client.getSubscribedUsers() 関数
    • Client.getUser(identity) 関数
    • Client.getUserChannelDescriptors() 関数
    • Client.getUserDescriptor(identity) 関数
    • Client#event:userSubscribed イベント
    • Client#event:userUnsubscribed イベント
    • Client#event:userUpdated イベント
    • Member.getUser() 関数
    • Member.getUserDescriptor() 関数
    • 新規Userクラス
    • 新規UserDescriptorクラス

Programmable Chat 0.13.0 (March 30, 2017)


  • Enable optimized UserInfo retrieval


  • Fixed a bug whereby a Client init race condition caused issues in some browsers (EDGE and other browsers more rarely)
  • Ensure callbacks will arrive for channel left (fixed a race)
  • Fixed an issue whereby leaving and rejoining a channel caused events to not be received after the rejoin
  • Fixed an issue so that the channelAdded event for public channels being joined was correctly fired again

Programmable Chat 0.12.0 (February 23, 2017)


  • The endpoint_id identifier specified in access tokens is now automatically generated and persisted in the client browser cache. The following should be observed with this change:
    • endpoint_id is no longer a required identifier in your generated access tokens, you may omit it from this build forward
    • endpoint_id がアクセストークンに指定されると無視されるようになりました
  • Added a direction parameter to channel.getMessage method. backwardsis default direction to keep api compatible with previous versions


  • Fixed a bug whereby the anchor parameter in channel.getMessage method was incorrectly processed.

Programmable Chat 0.11.1 (2016年12月7日)


  • Fixed an issue where sometimes a 404 error was returned when querying a channel for messages and members, when the channel was retrieved through getChannelBySid and getChannelByUniqueName directly after the client start
  • クライアントが購読設定エラーによって時々起動に失敗する事象を修正されました
  • 特定の状況下で、クライアントのインスタンスが不正な接続状態となる事象が修正されました

Programmable Chat 0.11.0 (2016年11月21日)


  • Constructor doesn't accept AccessManager interface anymore. Just token. Also user has to call client.updateToken himself when needed.
  • Removed client.identity property. Use client.userInfo.identity
  • client.getUserChannels is now paged and returns only channels which are related to the identity (statuses are: invited, joined, and private channels)
  • client.getPublicChannels returns list of channelDescriptor, also in paged manner
  • channel.getMessagesPaged is removed
  • channel.getMessages() returns paginator instead of array
  • カウンターメソッドであるchannel.getMessagesCount、channel.getUnreadMessagesCount、channel.getMembersCountが追加されました
  • userInfo#updated event now also reports a name of a key which has been updated


We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.



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

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!


        Get link

        Get a free personal referral link here


        Give $10

        Your user signs up and upgrade using link


        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more