Run Flex Insights on a Custom Domain

This Twilio product is currently available as a Public Beta release. Some features are not yet implemented and others may be changed before the product is declared as Generally Available. Beta products are not covered by a Twilio SLA. Learn more about beta product support.

This article helps you to take the full advantage of Historical Reporting in Flex. It guides you through enabling Historical Reporting for self-hosted Flex and for your local development environment.

If you use hosted Flex on domain you do not need to take any action. Access to Flex Insights Historical Reporting from domain is allowed by default. If you still have difficulty accessing Historical Reporting please contact our support.

With full access to Historical Reporting you can enhance your Flex Instance with important contextual data that help your users make informed decisions in any situation.

Self-Hosted Flex on Custom Domain

If you use self-hosted Flex you need to ask our support team to allow access from domains that your Flex runs on. Follow these steps:

  1. Check that address in your browser address bar does not start with
  2. Create a list of all domains on which you plan to run Flex, so you can ask to enable access for all of them at once. Do not forget development, staging and testing instances.
  3. Contact our support team with a request to enable access to from the domains you have collected. Provide support with account SIDs associated with every domain you need to allow.
  4. Wait for confirmation that your domains are allowed to access Historical Reporting.

After these steps are completed you can take advantage of Historical Reporting programmability.

Local Development

When embedding Historical Reporting into you customized Flex you might need to access Historical Reporting from localhost. We do not enable CORS to access Historical Reporting from localhost as it poses a security risk. To enable rapid prototyping and development on your local machine you need to run a local proxy service.

To make development as easy as possible, we have built our own proxy server that you can easily run locally. The package can be run with npx @twilio/flex-ui-dev-proxy . Out of the box it runs on localhost:8081, but both host and port can be configured. Please refer to the for more details.

Using the Proxy in your own stack

While running the proxy as a separate process is recommended, it is possible to import just the express middleware or webpack proxy configuration object from the package, so that you can use it in your own stack. Please refer to the for more information.

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.

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!