Embed a Dashboard Using a Generated Snippet and Trusted Access Tokens

insightsoftware recommends using Trusted Access for all embed-related workflows.

To embed a dashboard into your application using Trusted Access Tokens:

  1. Verify that the embedded dashboard prerequisites have been met. See Embedded Component Prerequisites.

  2. Use the Symphony API to register your host application as a Trusted Access client of your Symphony instance and obtain a client ID and client secret. See Trusted Access - Register a Client.

  3. Add a window.composerGetToken function to your host application to obtain an access token and expiration for a user session when a user uses the embedded dashboard.

    The composerGetToken function must communicate with a server you have created (see Step 4) that takes information about the active user session (the user name) and contacts Symphony to generate an access token for the user session. This is an async function that returns a promise. For example:

    window.composerGetToken = async function composerGetToken() {
    					return { access_token: "<access_token>", expires_in: <seconds> };
    				};

    Where <access-token> is the Trusted Access token you obtain from your server and <seconds> is the number of seconds until the token expires.

  4. Implement your own server-side code that accepts requests generated by the window.composerGetToken function and, in turn, makes requests to Symphony to generate a token for the specific user session of a user using the embedded dashboard. Your server-side code should respond to these requests with a token and expiration information.

    To generate an access token for the user, call the Trusted Access push/tokens API to generate tokens for new Symphony users, or the pull/tokens API to retrieve tokens for existing users. See Trusted Access API Endpoints and Trusted Access

  5. Generate and copy the embeddable snippet for your dashboard. See Generate an Embeddable Dashboard HTML Snippet.

  6. Insert the generated snippet into your host application using the appropriate script tag, configured to show the embedded dashboard in the appropriate HTML element.