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?

Changelog: Twilio Chat JavaScript SDK

Latest releases for the Programmable Chat JavaScript SDK

Programmable Chat's Javascript SDK is now at version v3.2. We recommend using the below links in your projects. As we patch bugs, these links will automatically be updated with the fixes with full backwards compatibility.

Upgrade to Programmable Chat JS SDK v2.0 or higher.

From June 1, 2019 forward, JavaScript SDKs earlier than v2.0 will be deprecated and cease to connect to the Twilio backend. If you still use Chat 0.x or 1.x, please leverage our migration guides and update to a later version at your nearest convenience.

Change Logs

Links are provided to specific patch versions here. We don't recommend using these links unless you have a specific need for a certain patch of a release.

Programmable Chat 3.2.3 (April 15, 2019)


  • Consumed new version of Sync JS SDK version 0.10.3
  • Link to the token generation material got updated

Programmable Chat 3.2.2 (April 2, 2019)

Bug Fixes

  • Fixed a bug where sending messages while offline caused duplicate messages at network reconnect

Programmable Chat 3.2.1 (February 21, 2019)

Bug Fixes

  • Improved error handling in operations with User, Member, Channel, Message

Programmable Chat 3.2.0 (December 7, 2018)


In this release we are introducing Member Attributes and the ability to change them.


  • Added dateCreated, dateUpdated, type, and attributes properties to Member class
  • Added Member.updateAttributes method to set a Member's Attributes (requires new permissions to be added to the according role: editOwnMemberAttributes or editAnyMemberAttributes)

Bug Fixes

  • Fixed a connectivity bug that caused unhandled promise rejections

Programmable Chat 3.1.0 (October 18, 2018)


In this release we are introducing a User Notification Level to each Channel. The assigned level determines whether the currently logged-in User will receive pushes for that Channel. The assigned level be any of muted or default, where default defers to global Chat Service push configuration.


  • Added Channel.setUserNotificationLevel method to set User's Notification level
  • Added notificationLevel property to Channel class

Bug Fixes

  • Fixed a connectivity bug that caused reconnection recovery to fail, including when backgrounding on iOS (react native).

Programmable Chat 3.0.2 (July 23, 2018)


  • Improved startup and synchronization time in some cases

Bug Fixes

  • Resolved potential issue in Channel synchronization on startup
  • Fixed bug preventing building React Native apps in Release configuration

Programmable Chat 3.0.1 (June 25, 2018)


  • Improve diagnostics, start adding timestamps to log lines

Bug Fixes

  • @types\loglevel package is not required anymore in TypeScript projects using twilio-chat

Programmable Chat 3.0.0 (May 31, 2018)


In this release we have revised all updated events. Each revised event now receives an object which contains:

  • updated object itself, i.e. channel, member, message, user
  • array of reasons the event is being triggered, i.e. object is updated because of update in attributes, friendlyName, body, etc.

Additionally, the Channel.LastMessage structure is updated to contain only last message's creation timestamp and index (effectively removing author and sid)

Breaking Changes

  • updated events now include reasons for the update. Changed events are:
    • Client#event:channelUpdated
    • Channel#event:updated
    • Client#event:memberUpdated
    • Channel#event:memberUpdated
    • Member#event:updated
    • Client#event:messageUpdated
    • Channel#event:messageUpdated
    • Message#event:updated
    • Client#event:userUpdated
    • User#event:updated
  • changing channel.sendMessage() promise resolve type to Promise<number>
  • default logLevel is now set to silent, log lines now includes timestamp
  • removed sid and author properties from Channel.LastMessage type

Additive Changes

  • adjust docs for Client.shutdown(), introducing new types for various methods
  • adding new events on client: tokenAboutToExpire, tokenExpired (essentially removing need for AccessManager use)
  • added index property to Channel.LastMessage type

Programmable Chat 2.2.0 (March 13, 2018)


  • Added method Client.unsetPushRegistrationId to unregister 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

Bug Fixes

  • 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

Bug Fixes

  • 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

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.

Breaking Changes

  • 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 function

Bug Fixes

  • 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)

Bug Fixes

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

Programmable Chat 1.2.0 (September 18, 2017)

New Features

  • 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)

Bug Fixes

  • 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)

Bug Fixes

  • 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)

Bug Fixes

  • 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)

Bug Fixes

  • 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

Bug Fixes

  • 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 (May 19, 2017)


  • Added a new Factory method for creating the SDK Chat Client instance, specifically to avoid issues caused by using client that was created but not fully initialized. Note that the old manual constructor has been marked as deprecated.

Bug Fixes

  • Fixed a rare issue whereby the client did not correctly initialise. This caused the typing indicator feature not to work correctly
  • Fixed an issue whereby messageRemoved events were not correctly firing for messages that present at client init (i.e. not added after client init)
  • The JS library should now be React Native friendly
  • Various Documentation fixes

Programmable Chat 1.0.0 (May 2, 2017)

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.


Client initialization has been simplified to reflect most users typical usage of the system. All user channels (channels for which the current user is joined to or an owner of) will be subscribed to from client startup but only the members roster will be synchronized initially. This keeps client startup fast while still reflecting the latest activity immediately to the client.

UserInfo has been deprecated and replaced with two distinct classed, User and UserDescriptor. Similar to ChannelDescriptor class, a UserDescriptor represents a snapshot of data in time that should be utilized directly after obtaining it but not retained since it will not be updated with new data over time.

Users are no longer implicitly subscribed to to improve performance on large instances. You can subscribe up to a maximum 100 of users at once after which your least recently subscribed User will be unsubscribed.


  • Removed
    • Client.getPublicChannels() function
    • Client.getUserChannels() function
    • Client#event:userInfoUpdated event
    • Member.userInfo property
    • Member#event:userInfoUpdated event
    • UserInfo class
  • Added
    • Channel.getUserDescriptors() function
    • ChannelDescriptor.isPrivate property
    • ChannelDescriptor.lastConsumedMessageIndex property
    • ChannelDescriptor.status property
    • ChannelDescriptor.type property
    • Client.getPublicChannelDescriptors() function
    • Client.getSubscribedChannels() function
    • Client.getSubscribedUsers() function
    • Client.getUser(identity) function
    • Client.getUserChannelDescriptors() function
    • Client.getUserDescriptor(identity) function
    • Client#event:userSubscribed event
    • Client#event:userUnsubscribed event
    • Client#event:userUpdated event
    • Member.getUser() function
    • Member.getUserDescriptor() function
    • new User class
    • new UserDescriptor class

Programmable Chat 0.13.0 (March 30, 2017)


  • Enable optimised UserInfo retrieval

Bug Fixes

  • 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 will be ignored if specified with your access token
  • Added a direction parameter to channel.getMessage method. backwardsis default direction to keep api compatible with previous versions

Bug Fixes

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

Programmable Chat 0.11.1 (December 7, 2016)

Bug fixes:

  • Fixed an issue where sometimes a 404 error was returned when querying a channel for messages and members, when the channel was retreived through getChannelBySid and getChannelByUniqueName diretly after the client start
  • Fixed an issue where the client sometimes failed to successfully start with a subscription setup error
  • Fixed an issue where under certain conditions, the incorrect connection state was for the client instance

Programmable Chat 0.11.0 (November 21, 2016)


  • 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
  • Added counter methods: channel.getMessagesCount, channel.getUnreadMessagesCount, channel.getMembersCount
  • userInfo#updated event now also reports a name of a key which has been updated
Rate this page:

Need some help?

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