---
title: "IssueMagicAuthToken creates a \"magic\" auth token that provides limited access to a specific filtered dashboard in a specific project."
method: POST
path: "/v1/orgs/{org}/projects/{project}/tokens/magic"
---

# IssueMagicAuthToken creates a "magic" auth token that provides limited access to a specific filtered dashboard in a specific project.

`POST /v1/orgs/{org}/projects/{project}/tokens/magic`

## Path parameters

- `org` string, required
- `project` string, required

## Request body

- object
  - `displayName` string — Optional display name to store with the token.
  - `fields` string[] — Optional list of fields to limit access to. If empty, no field access rule will be added. This will be translated to a rill.runtime.v1.SecurityRuleFieldAccess, which currently applies to dimension and measure names for explores and metrics views.
  - `metricsViewFilters` object — Optional metrics view to filter mapping to apply as row filters in queries. This will be translated to a rill.runtime.v1.SecurityRuleRowFilter with the metrics view in the condition_resources, which currently applies to metric views queries.
  - `resourceName` string — Name of the resource to grant access to.
  - `resourceType` string — Type of resource to grant access to.
  - `resources` V1ResourceName[] — list of resources to grant access to.
    - `name` string
    - `type` string
  - `state` string — Optional state to store with the token. Can be fetched with GetCurrentMagicAuthToken.
  - `ttlMinutes` string, int64 — TTL for the token in minutes. Set to 0 for no expiry. Defaults to no expiry.

## Response `200`

A successful response.

- V1IssueMagicAuthTokenResponse
  - `token` string
  - `url` string

## Other responses

- `default` — An unexpected error response.

## Changes

- **2026-01-09** (v1) `9517006b9437` — 1 info
  - added the new `OPERATION_CAST` enum value to the request property `metricsViewFilters/additionalProperties/cond/op`
- **2026-01-06** (v1) `f0c78da4fdcb` — 1 warning, 1 info
  - removed the request property `filter`
  - added the new optional request property `metricsViewFilters`
- **2025-12-11** (v1) `f317ff96998d` — 1 warning, 1 info
  - removed the request property `metricsViewFilters`
  - added the new optional request property `filter`

[Change history](https://skmtc.dev/rilldata/apis/rill-admin-api/changes/v1/orgs/:org/projects/:project/tokens/magic/post.md)

---

[API](https://skmtc.dev/rilldata/apis/rill-admin-api.md) · [All operations](https://skmtc.dev/rilldata/apis/rill-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rilldata/rill-admin-api/revisions/abe7a430f373/schema)
