POST
/
api
/
generate_jwt
/
curl --location --request POST 'https://api.explo.co/api/generate_jwt/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
    "provided_id": "customer_1",
    "embed_id": "abcde",
    "expiration": "PT1H",
    "key_id":"aa111111-1a11-111a-aa11-1aaaa11a1a11"
}'
{
  "success": 1,
  "jwt": "<example_jwt>"
}

This endpoint generates a JWT (JSON Web Token) with the provided customer id and embed id encoded in it. This token expires at the provided time, default is 24 hours after creation.

Body

provided_id
string

This is the id you’ve provided Explo for the customer you’d like to encode in this JWT.

embed_id
string

This is the id of the dashboard or report builder you’re embedding.

key_id
string | null

This is the id of the key you’d like to use to encrypt your JWT. This ID can be taken from the Data Visibility Groups section of the settings page. If no key id is provided, Explo will generate one.

expiration
string

This is the date time that you want your JWT to expire at, in ISO08601 duration format. If not provided, this will be set to 24 hours after creation.

chart_id
string

If embedding a single chart, provide the id of the chart here. This feature must be enabled by Explo.

Response

jwt
string

The JWT you requested. You can use this immediately in your embed.

curl --location --request POST 'https://api.explo.co/api/generate_jwt/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
    "provided_id": "customer_1",
    "embed_id": "abcde",
    "expiration": "PT1H",
    "key_id":"aa111111-1a11-111a-aa11-1aaaa11a1a11"
}'
{
  "success": 1,
  "jwt": "<example_jwt>"
}