---
title: "IssueUserAuthToken issues an access token for the current user.
You can optionally pass \"current\" instead of the user ID to issue a token for the current user."
method: POST
path: "/v1/users/{userId}/tokens"
---

# IssueUserAuthToken issues an access token for the current user.
You can optionally pass "current" instead of the user ID to issue a token for the current user.

`POST /v1/users/{userId}/tokens`

## Path parameters

- `userId` string, required

## Request body

- object
  - `clientId` string — Client ID to issue the token for.
  - `displayName` string — Optional display name for the auth token.
  - `representEmail` string — Optional email of another user to assume the identity of. This is only allowed for superusers.
  - `superuserForceAccess` boolean — Flag for superusers to override normal access checks.
  - `ttlMinutes` string, int64 — Optional TTL for the auth token in minutes. Set to 0 for no expiry. Defaults to no expiry.

## Response `200`

A successful response.

- V1IssueUserAuthTokenResponse
  - `token` string — Newly issued auth token.

## Other responses

- `default` — An unexpected error response.

---

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