Create a signed link

To create a signed link:

  1. Prepare the token payload:

    • Get your private key issued when creating the Embedding key.

    • Create a JWT payload with the following parameters:

      • embedID from the embedding entities list.

      • dlEmbedService: "doublecloud", the static service identifier.

      • iat, token issue time, in the UNIX timestamp format.

      • exp, token expiration time, in the UNIX timestamp format. The total token lifespan can't exceed 10 hours.

      • (optional) params Additional parameters: signed_param1: string | number.

      Example:

      {
      "embedId": "<your_embed_id>",
      "dlEmbedService": "doublecloud",
      "iat": number, // Time of token creation, UNIX timestamp,
      "exp": number, // Time of token expiration, UNIX timestamp. Total token lifespan can't exceed 10 hours.
      "params": { // Optional signed parameters
         "signed_param1": string | number,
         "signed_param2": string | number,
         ...
         },
      }
      
  2. Sign your token payload using your private key. Use the PS256 algorithm.

    Warning

    Use the private key value starting from the -----BEGIN RSA PRIVATE KEY----- line.

  3. Compose the embedding URL:

    https://app.double.cloud/embeds/chart?__dl_embed_token=<TOKEN>
    

See also