Embed Tokens
APIs to share maps securely
Embed tokens enable safely sharing your private maps.
With these APIs, you can generate secure tokens for embedding maps.
Creates a token, valid for 12 hours, for authenticating a visitor to view a private embedded map view without being logged into Felt. You must provide a user_email to associate the token with the end user that will be viewing the map. Each end user should be a member of your Felt workspace with a viewer, editor, or admin role assigned.
Mint a fresh token for each page load. The 12 hours cover a full working session in one open tab — reconnects included — and when they run out the embed asks the visitor to refresh, at which point your page should mint again.
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.
Turn on "Viewer permissions: Export data" in Map settings
Each token must be associated with the email address of the user who will use it.
EmbedToken
2024-05-25T15:51:34UnauthorizedError
UnauthorizedError
NotFoundError
Unprocessable Entity
Unprocessable Entity
InternalServerError
POST /api/v2/maps/{map_id}/embed_token?user_email=text HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"expires_at": "2024-05-25T15:51:34",
"token": "text"
}Last updated
Was this helpful?