---
title: "GetDeployment returns runtime info and access token on behalf of a specific user, or alternatively for a raw set of JWT attributes"
method: POST
path: "/v1/deployments/{deploymentId}/credentials"
---

# GetDeployment returns runtime info and access token on behalf of a specific user, or alternatively for a raw set of JWT attributes

`POST /v1/deployments/{deploymentId}/credentials`

## Path parameters

- `deploymentId` string, required

## Request body

- object
  - `accessTokenTtlSeconds` integer — Optional TTL for the returned access token in seconds.
  - `attributes` object — If set, will use the provided attributes outright.
  - `externalUserId` string — Optional ID for an external end user of the deployment. If set, the access token enables per-user state, such as AI chat history. Cannot be combined with `user_id`. If `user_email` matches a Rill Cloud user, their attributes are used, but this ID takes precedence for per-user state.
  - `superuserForceAccess` boolean — If true, superusers can access the deployment even without org/project membership.
  - `userEmail` string — If set, will generate attributes corresponding to a user with this email.
  - `userId` string — If set, will use the attributes of the Rill user with this ID.

## Response `200`

A successful response.

- V1GetDeploymentResponse
  - `accessToken` string
  - `instanceId` string
  - `runtimeHost` string
  - `ttlSeconds` integer

## Other responses

- `default` — An unexpected error response.

## Changes

- **2026-04-15** (v1) `c99343202596` — 1 info
  - added the new optional request property `superuserForceAccess`
- **2026-04-13** (v1) `6e4c4db590df` — 1 info
  - added the new optional request property `externalUserId`
- **2025-12-11** (v1) `f317ff96998d` — 2 warning
  - removed the request property `externalUserId`
  - removed the request property `superuserForceAccess`

[Change history](https://skmtc.dev/rilldata/apis/rill-admin-api/changes/v1/deployments/:deploymentId/credentials/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)
