Rate this page:

The appConfig.js object

You can control the behavior and appearance of your self-hosted Flex UI instance by specifying configuration properties in a Javascript object housed within a file named appConfig.js.

This file must be made accessible on your Flex UI server at the location:


The Flex UI application attempts to load the appConfig.js file from your server at startup. Flex UI then fetches your account's current Configuration resource via the Flex Configuration REST API, and merges any properties found in the ui_attributes field with the properties defined in appConfig.js to determine the app's effective configuration. Values defined in your server's appConfig.js take precedence over corresponding values defined in ui_attributes via the REST API.

See the REST API configuration guide to learn more about the Flex Configuration REST API.

The appConfig.js object is only directly accessible if you are running a self-hosted instance of Flex UI. If you are not running a self-hosted Flex instance (i.e. if you access Flex at, use the Flex Coniguration REST API to manage your Flex instance's configuration.

Configuration properties

To see a complete list of fields you can specify in the configuration object, check out the Flex UI reference docs for the major version of Flex UI that you are using:

Sample content

This is example content for a valid Flex UI 2.x appConfig.js file.

var appConfig = {
  serviceBaseUrl: "",
  sso: {
  sdkOptions: {
      chat: {},
      insights: {},
      voice: {},
      worker: {}
  logLevel: "debug",
  theme: {
    isLight: false
  componentProps: {
    CRMContainer: {
      uriCallback: (task) => task
        ? `${}`
        : ""
  router: {
    type: "memory",
    history: {
      initialEntries: [ "/agent-desktop" ]
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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Loading Code Sample...

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

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

        Thanks for your feedback!