Embed SDK Authentication

Some of methods are calling directly Toucan's API, such as:

If you want to use those methods, you need to pass an authentication token when initializing the SDK. It requires an opaque token, follow the steps to authenticate embeds.

As JWT token's payload embed_context, we recommend to use:

  // to get from admin inteface
  "iss": "ISS"
  // to get from admin interface
  "aud": "OAUTH_URL/TENAN_ID/oauth/oauth-token",
  // when you want the token to expire, in seconds since 1970-01-01
  "exp": 0,
  "sub": "toucan-embed-client",
  "embed_context": {
    "username": "SDK_TOKEN",
    // to get from admin interface
    "workspace_id": "WORKSPACE_ID"
    "roles": ["ADMIN"],
    // ADMIN role grant access to all apps
    "privileges": {},
    "groups": [],
    "attributes": {}

Last updated