Guest tokens are designed for frontend embedding. Never expose your API key in frontend code - always generate tokens from your backend.
Simple Usage: Only clientId and dataAppName are required. All other parameters (params, permissions, expiryTime, datasourceName) are optional for advanced use cases.
Advanced Features Available:
Dashboard & metric-level filtering (dashboardAppFilters, appFilters)
Fine-grained permissions control (permissions object)
Private metrics for end users (userIdentifier)
Multi-datasource support (datasourceName)
Conditional filter visibility (hideDashboardFilters, isShowOnUrl)
Token expiration management (expiryTime)
Authentication
All API requests must include your API key in the Authorization header. Get your API token when creating a data app - see our data app creation guide for details.
Finding your API token: For detailed instructions, see the API Token guide .
Bearer token for API authentication. Use your API key from the data app. Authorization: Bearer dbn_live_abc123...
Must be set to application/json for all requests. Content-Type: application/json
Request Body
Unique identifier for the end user. This should be your user’s ID from your system. Used for row-level security and access control.
Use your internal user ID
Keep it consistent across sessions
Alphanumeric characters recommended
The name of your data application. Must match an existing data app in your workspace and be alphanumeric.
"sales-dashboard"
"marketing-metrics"
"customer-analytics"
Additional parameters for token customization and filtering. Application-level filters for controlling access to individual metrics. Unlike RLS settings, app filters restrict access without requiring end user input.
App filters are ideal for implementing metric-level access control that is invisible to end users.
params.appFilters.metricId
The metric ID to apply filters to. Required if appFilters is provided.
Filter values to apply to the metric. Supports multiple data types:
Boolean : "paid_orders": true
Number : "amount": 500
String : "country": "USA"
Array (multi-select): "countries": ["USA", "CANADA"]
SQL Query : { "sql": "SELECT...", "columnName": "name" }
Show Example with multiple filter types
{
"metricId" : "metric_123" ,
"values" : {
"paid_orders" : true ,
"amount" : 500 ,
"country" : [ "USA" , "CANADA" ],
"region" : {
"sql" : "SELECT \" name \" FROM \" public \" . \" regions \" WHERE isActive=true" ,
"columnName" : "name"
}
}
}
params.dashboardAppFilters
Dashboard-level filters that apply to all metrics on a dashboard. Supports multiple filter types for flexible data filtering.
params.dashboardAppFilters.dashboardId
The dashboard ID to apply filters to. Required if dashboardAppFilters is provided.
params.dashboardAppFilters.values
Filter values to apply to the dashboard. Supports various filter formats:
Single string : "name": "Eric"
Multi-select : "country": ["USA", "CANADA"]
Date range : "timePeriod": { "startDate": "2024-01-01", "endDate": "2024-03-23" }
Number range : "price": { "min": 1000, "max": 5000 }
SQL query : { "sql": "SELECT...", "columnName": "name" }
Show Complete example with all filter types
{
"dashboardId" : "dashboard_abc123" ,
"values" : {
"name" : "Eric" ,
"country" : [ "USA" , "CANADA" ],
"timePeriod" : {
"startDate" : "2024-01-01" ,
"endDate" : "2024-03-23"
},
"price" : { "min" : 1000 , "max" : 5000 },
"region" : {
"sql" : "SELECT \" name \" FROM \" public \" . \" countries \" WHERE isEnabled=true" ,
"columnName" : "name"
}
},
"isShowOnUrl" : false
}
params.dashboardAppFilters.isShowOnUrl
Controls visibility of filter values in URL search parameters. When false, filters are applied but not visible to end users in the URL. Set to false to hide sensitive filter criteria from end users while still applying the filtering logic.
params.hideDashboardFilters
Array of filter names to hide from the dashboard interface. Use this to conditionally hide specific filters based on user permissions or context. {
"clientId" : "user-456" ,
"dataAppName" : "sales-dashboard" ,
"params" : {
"hideDashboardFilters" : [ "region_filter" , "date_range" , "status" ]
}
}
Unique identifier for the end user in your system. Enables features like creating private metrics and publishing metrics directly from the embed view. The isAllowPrivateMetricsByDefault setting must be enabled when creating the dashboard for this feature to work.
When set, metrics created by this user identifier can be:
Saved as private (visible only to this user)
Published to share with other users
Managed independently per user
{
"clientId" : "client-123" ,
"dataAppName" : "analytics-app" ,
"params" : {
"userIdentifier" : "user_john_doe_789"
}
}
Permission settings for the embedded interface.
permissions.isEnableArchiveMetrics
Allow archiving metrics.
permissions.isEnableManageMetrics
Allow managing metrics (view, edit, organize).
permissions.isEnableCreateDashboardView
Allow creating custom dashboard views.
permissions.isEnableMetricUpdation
Allow updating metric configurations.
permissions.isEnableCustomizeLayout
Allow customizing dashboard layout.
permissions.isEnableUnderlyingData
Allow viewing underlying data behind charts.
permissions.isEnableDownloadMetrics
Allow downloading metric data.
permissions.isShowSideBar
Show the sidebar navigation.
permissions.isShowDashboardName
Show the dashboard name in the interface.
permissions.isDisableMetricCreation
Disable metric creation in embedded dashboards. When set to true, end users cannot create new metrics.
Setting this to true disables only the metric creation feature for end users in the embedded interface.
If you want to allow metric creation again, you’ll need to update the embed configuration and set this option to false or remove it.
Overrides other metric creation permissions when enabled.
Optional. Token expiration time in milliseconds from now. If not provided, token never expires.
3600000 - 1 hour (3600 * 1000 ms)
86400000 - 24 hours
604800000 - 7 days
Optional. Datasource name for multi-datasource connection setups. Required when your data app uses multiple datasources.The datasource name is available in the Data Studio tab of your dashboard. This parameter is only necessary if you have configured multiple datasources for your data app.
Show Multi-datasource example
{
"clientId" : "user-456" ,
"dataAppName" : "analytics-app" ,
"datasourceName" : "production_db_replica"
}
Response
UUID token for authentication. Pass this to your frontend component for embedding.
Error object if the request failed, otherwise null for successful requests.
HTTP Status Code Summary
Status Code Description 200OK - Request succeeded400Bad Request - Invalid request parameters401Unauthorized - Invalid or missing API key403Forbidden - Access denied to resource404Not Found - Resource not found429Too Many Requests - Rate limit exceeded500Internal Server Error - Server error occurred
Error Codes
Error Code HTTP Status Description AUTHENTICATION_ERROR401 Invalid or missing API key INVALID_REQUEST_BODY400 Missing or invalid parameters CLIENT_ID_ERROR400 Invalid clientId format or value DATA_APP_ID_ERROR404 Data app not found WORKSPACE_ID_ERROR404 Workspace not found or inaccessible DASHBOARD_PARAM_ERROR400 Invalid dashboard filter parameters APP_FILTER_PARAM_ERROR400 Invalid app filter configuration RLS_SETTINGS_PARAM_ERROR400 Invalid RLS settings RATE_LIMIT_EXCEEDED429 Too many requests INTERNAL_SERVER_ERROR500 Server error INVALID_PERMISSIONS403 Invalid permission settings EXPIRED_TOKEN401 Token has expired
Quick Start Guide
Rate Limiting : API requests are limited to prevent abuse. Implement exponential backoff for rate limited requests (429 status).
Next Steps