---
title: "Deprecated. This method will be removed in future versions of TSB. Use Service Accounts instead."
method: POST
path: "/v2/organizations/{organization}/users/{user}:generateTokens"
tags: ["Teams"]
---

# Deprecated. This method will be removed in future versions of TSB. Use Service Accounts instead.

`POST /v2/organizations/{organization}/users/{user}:generateTokens`

## Request

- Base URL: `https://docs.tetrate.io` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.tetrate.io/v2/organizations/{organization}/users/{user}:generateTokens`
- Auth: none declared
- TypeScript: <https://skmtc.dev/tetrate/apis/tetrate-service-bridge-api/docs/v2/organizations/:organization/users/:user:generateTokens/post.ts> (a function with typed inputs; its response is checked against the schema)

Generate the tokens for a local user account so it can authenticate against management plane.
This method will return an error if the user account is not of type MANUAL. Credentials for
normal platform users must be configured in the corresponding Identity Provider.

## Path parameters

- `organization` string, required
- `user` string, required

## Response `200`

A successful response.

- V2TokenResponse: Contains a pair of tokens for a user that can be used to authenticate against TSB.
  - `accessToken` string: Bearer access token that can be used to access TSB. This token is usually short-lived. The refresh token, when present, can be used to obtain a new access token when it expires.
  - `refreshToken` string: Refresh token that can be used to obtain a new Bearer access token. This token is usually long-lived and should be stored securely.

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/tetrate/apis/tetrate-service-bridge-api.md) - [All operations](https://skmtc.dev/tetrate/apis/tetrate-service-bridge-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tetrate/apis/tetrate-service-bridge-api/revisions/2f19c3a1ae57?raw)
