---
title: "Get subaccount access token"
method: PUT
path: "/auth/token/{userId}"
tags: ["auth"]
---

# Get subaccount access token

`PUT /auth/token/{userId}`

This endpoint allows user to receive access token of another user that can be used to impersonate their account and access luma services. It can only be invoked by an access token with apiUser role, generated with a client_id and a client_secret via POST /api/v2/auth/token.

## Path parameters

- `userId` string, required

## Request body

- object
  - `expires_in` number — Seconds for the token to expire.

## Response `200`

Returns a JWT token that can be used as a Bearer token.

- object
  - `access_token` string, required
  - `token_type` 'Bearer', required

## Other responses

- `400` — A 400 will be returned if any of the request parameters (clientId or clientSecret) is malformed/invalid or missing.

---

[API](https://skmtc.net/lumahealth/apis/rest-service.md) · [All operations](https://skmtc.net/lumahealth/apis/rest-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lumahealth/rest-service/revisions/d3c75c2a2f1d/schema)
