---
title: "Get User Token (getUserToken)"
method: GET
path: "/api/user/{userId}/token"
tags: ["user-controller"]
---

# Get User Token (getUserToken)

`GET /api/user/{userId}/token`

Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant.

## Path parameters

- `userId` string, required

## Response `200`

OK

- JwtPair — JWT Pair
  - `token` string — The JWT Access Token. Used to perform API calls.
  - `refreshToken` string — The JWT Refresh Token. Used to get new JWT Access Token if old one has expired.
  - `scope` 'SYS_ADMIN' | 'TENANT_ADMIN' | 'CUSTOMER_USER' | 'REFRESH_TOKEN' | 'PRE_VERIFICATION_TOKEN' | 'MFA_CONFIGURATION_TOKEN'

---

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