SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Email Dashboards Without Exposing All Insights Data

Issue

When attempting to email dashboard reports directly to users, the platform requires recipients to have full Insights API permissions. Granting this level of access exposes all instance and workspace data to those users, creating a security issue when trying to restrict data visibility.

Product

Flex Insights

Environment

Twilio Console, Flex Analytics Portal

Cause

Native dashboard sharing relies on recipient roles having broad Insights API permissions. Because permissions cannot be scoped down to a single dashboard at the user level, native sharing exposes the entire workspace's data instance to the recipient.

Option 1: Manual Data Export and Emailing

  1. Log into Flex and open the Analytics Portal using an authorized account.

  2. Navigate to the desired report or dashboard.

  3. Hover over the report title and click the three-dot options icon.

  4. Click Download As and select your target export format (PDF, PNG, XLSX, or CSV).

  5. Attach the downloaded report file to an email and send it directly to recipients using your corporate email client.

Option 2: Dynamic Scripting using the Flex Insights Export API

  1. Obtain API user credentials with access to your provisioned Flex Insights Workspace.

  2. Authenticate against the API by sending a POST request to /gdc/account/login to retrieve a Super Secured Token (SST), followed by a GET request to /gdc/account/token for a Temporary Token (TT).

  3. Retrieve your Workspace ID from the Analytics Portal URL and your report Object ID from the report's browser address bar URL.

  4. Execute a POST request to [https://analytics.ytica.com/gdc/app/projects/](https://analytics.ytica.com/gdc/app/projects/){workspace_id}/execute/raw containing the report object path payload and GDCAuthTT cookie header.

  5. Handle potential 202 HTTP response statuses with a retry loop until a 200 response returns the export download URI.

  6. Issue a GET request to [https://analytics.ytica.com/](https://analytics.ytica.com/){URI} to fetch the generated CSV data.

  7. Configure an automated script or serverless function (e.g., Twilio Functions, AWS Lambda) to pass the raw data payload to an email delivery service (such as Twilio SendGrid) and dispatch it to recipients automatically.

Additional Information

  • For step-by-step authentication workflows and payload samples, see Export Data from Flex Insights via API.

  • Running automated API export scripts keeps system credentials secure while ensuring end recipients only receive relevant data attachments without accessing the Flex interface.

Have more questions? Submit a request
Powered by Zendesk