1 Reply Latest reply on Nov 5, 2019 12:02 AM by Santiago Sanchez

    Extract png / base64 image of dashboard from JavaScript API

    Lindsey Simon

      I have a dashboard URL: https://10ay.online.tableau.com/t/myCompany/views/ExecutiveDashboard/ExecDashboard?:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:device=desktop

      I've noticed that I can manually download an image if I visit https://10ay.online.tableau.com/t/quip/myCompany/ExecutiveDashboard/ExecDashboard.png

       

      I'm using the JavaScript API (new window.tableau.Viz) to load that dashboard into my page.

       

      I'd like to programmatically grab the png but I don't have programmatic access to the auth context inside the iframe where the dashboard is loading and thus when loading the ExecDashboard.png URL using XHR it redirects to a login flow so I'm not sure how I might be able to accomplish this?

      For example, I want to store the base64 string of the current state of the dashboard so that subsequent loads will work offline.

       

      Any advice or suggestions?