Embed Tokens

Generate an Embed Token

Creates a short-lived (15 minutes) token for authenticating a visitor to view a private embedded map view without being logged into Felt.

Usage

  • Generate a token by making a call to this API from your server

  • Securely pass the token to your frontend client

  • Include the token as a query parameter on the Embed URL in an iframe

<iframe src="https://felt.com/embed/map/{mapId}?token={token}"></iframe>

Enabling Layer Export

You can allow EmbedToken based page views to export layer data.

  • Include a user_email query parameter when creating the EmbedToken

  • Turn on "Viewer permissions: Export data" in Map settings

post
Authorizations
Path parameters
map_idstringRequired
Query parameters
user_emailstringOptional

Optionally assign the token to a user email address. Providing an email will enable the viewer to export data if the Map allows it.

Responses
200
EmbedToken
application/json
post
POST /api/v2/maps/{map_id}/embed_token HTTP/1.1
Host: felt.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "expires_at": "2024-05-25T15:51:34",
  "token": "text"
}

Last updated

Was this helpful?