---
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.

---

[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/versions/289a0ca9ce49/schema)
