Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM

On this page
Looking for more inspiration?Visit the

Enable Flex UI 2.x.x on your account


This page explains how to enable Flex UI 2.x.x on your Flex application. For more information about the entire migration process, see Migrate from Flex UI 1.x.x to 2.x.x.


Enable Flex UI 2.x.x on your account

enable-flex-ui-2xx-on-your-account page anchor

Using the Flex UI versions page

using-the-flex-ui-versions-page page anchor

You can install Flex UI 2.x.x on the Flex UI versions(link takes you to an external page) page in Twilio Console.

If you're running a 1.x.x version, select 2.x.x and click Confirm. If you're on a public beta version of 2.x.x, install 2.x.x by clicking on the 2.x.x version link and then Install.

Using the Configuration service API

using-the-configuration-service-api page anchor

To change the ui_version and reset your ui_dependencies, make the following curl request. Change 2.x.x to the version number that you're migrating to. Use your API key SID and API key secret for TWILIO_API_KEY and TWILIO_API_SECRET. To create an API key, see Create and manage API keys in the Console.

1
curl -X POST "https://flex-api.twilio.com/v1/Configuration" \
2
-u "$TWILIO_API_KEY:$TWILIO_API_SECRET" \
3
-H "accountsid: ACXXXXXXXXXXXXXXXXXXXXX" \
4
-H "content-type: application/json" \
5
-H "i-twilio-auth-account: ACXXXXXXXXXXXXXXXXXXXXX" \
6
-d '{
7
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXX",
8
"ui_version": "~2.x.x",
9
"ui_dependencies": {}
10
}'

You can install Flex UI 2.x.x via yarn or npm:

yarnnpm
yarn add @twilio/flex-ui@^2

Refer to Upgraded dependencies if you run into compatibility issues which you will need to resolve.

Using the flex-ui-sample package

using-the-flex-ui-sample-package page anchor

To use the flex-ui-sample package for bootstrapping your project, make sure to pull the latest from the main branch of the flex-ui sample repo(link takes you to an external page) which requires the @twilio/flex-ui@^2 package. We've also bumped React to version 17 to satisfy the Flex 2.x.x requirements. This means that on any existing project, you have to resolve compatibility issues in your code should they occur.