> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Token Body

> Here you will see what are the fields to pass in the body while creating a guest token.

JSON body -

* dataAppName (required string) - The name of the data app for which you are creating the guest token.

* clientId (required string) - The primary key of the client/organization in the workspace for which you are creating the guest token.

* params (optional JSON object) - Optional token parameters (filters, embed allowlisting, end-user identity, timezone).

* permissions (optional JSON object) - Dashboard permission toggles. Boolean keys: `isEnableArchiveMetrics`, `isEnableManageMetrics`, `isEnableCreateDashboardView`, `isEnableMetricUpdation`, `isEnableCustomizeLayout`, `isEnableUnderlyingData`, `isEnableDownloadMetrics`, `isShowSideBar`, `isShowDashboardName`, `isDisableMetricCreation`. No other keys exist (there is no `permissions.dashboards`).

* expiryTime (optional number, milliseconds) - How long the token stays valid, measured from the moment it is created. If omitted, the token never expires.

* datasourceName(required string with multi data source connection) - The data source name to be used as data connection. (not applicable for datasource or datamart connection).

* datamartName (optional string) - Scope the token to a specific Datamart.

The body is validated strictly: any field not listed here is rejected with `INVALID_REQUEST_BODY`. `dataAppId`, `client_id`, and `tenant_id` are not valid fields — use `dataAppName` and `clientId`.

body -> params (optional JSON object) -

* rlsSettings (optional array of JSON object) - if you want to apply any rls settings then here you can pass the "metricId" for which you want to apply the filter and "values" which is an object of filter name and filter value.

* appFilters (optional array of JSON object) - if you want to apply metric-level filters with the app filter variant then here you can pass the "metricId" for which you want to apply the filter and "values" which is an object of filter name and value.

* dashboardAppFilters (optional array of JSON object) - dashboard-level filters to apply on a specific embedded dashboard.

* allowedEmbeds (optional array of strings) - allowlist of IDs this token is allowed to load. Each entry must match the ID passed to the embed component (`dashboardId` attribute); embed IDs and dashboard IDs both resolve. Loading any other ID fails with `UNAUTHORIZED`.

* userIdentifier (optional string) - unique identifier for the end-user to enable private/publish metrics in embeds.

* timezone (optional string) - IANA timezone (e.g. `"America/New_York"`) for timezone-aware queries and date formatting.

* accessPermissions (optional JSON object) - end-user dashboard-filter controls: `isAllowEndUserDashboardFilter` (boolean) and `dashboardFilterColumns` (array of `{ tableName, columns }`).

params -> rlsSettings (optional array of JSON object) -

* metricId (required string) - the id of the metric you want to apply the rls filters which you can find on the metric page in the header below the metric name.

* values (required JSON object) - the filters name and value pairs that you want to apply.

params -> appFilters (optional array of JSON object) -

* metricId (required string) - the id of the metric you want to apply the rls filters which you can find on the metric page in the header below the metric name.

* values (required JSON object) - the filters name and value pairs that you want to apply.

params -> hideDashboardFilters(optional array of strings) -

* array of name of filters
