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. You must provide a user_email
to associate the token with the end user that will be viewing the map.
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
post
Authorizations
Path parameters
map_idstringRequired
Query parameters
user_emailstringRequired
Each token must be associated with the email address of the user who will use it.
Responses
200
EmbedToken
application/json
401
UnauthorizedError
application/json
403
UnauthorizedError
application/json
404
NotFoundError
application/json
422
Unprocessable Entity
application/json
429
Unprocessable Entity
application/json
500
InternalServerError
application/json
post
POST /api/v2/maps/{map_id}/embed_token HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*
{
"expires_at": "2024-05-25T15:51:34",
"token": "text"
}
Last updated
Was this helpful?