---
title: "Create an auth token."
method: POST
path: "/me/auth-tokens"
tags: ["me"]
---

# Create an auth token.

`POST /me/auth-tokens`

Create a short-term authentication token using user credentials for exchanging access and refresh tokens.

## Request body

- CreateAuthTokenRequest
  - `email` string, required — User's email address. - Must be a valid email format.
  - `password` string, required — User's password.

## Response `201`

Successfully created an auth token for user.

- AuthTokenResponse
  - `authToken` string, required — A temporary token issued after the initial login step. This token is used in the create session API to exchange for access and refresh tokens.
  - `is2FARequired` boolean, required — Whether two-factor authentication (2FA) is required for the create session API. If `true`, the client must include an OTP code in the request body to complete the authentication.

## Other responses

- `400` — - [group:**request**, code:**0**]: Invalid field in the request body. - [group:**request**, code:**1**]: The request body is required. - [group:**session**, code:**0**]: Invalid email or password.
- `429` — - [group:**rate-limit**, code:**0**]: Rate limit exceeded.
- `500` — - [group:**email**, code:**0**]: Failed to send email. - [group:**rate-limit**, code:**1**]: Failed to get rate limit configuration. - [group:**rate-limit**, code:**2**]: Failed to save rate limit configuration. - [group:**session**, code:**200**]: Failed to create auth token. - [group:**session**, code:**201**]: Failed to save auth token data. - [group:**session**, code:**204**]: Failed to create OTP code. - [group:**session**, code:**207**]: Unsupported OTP code delivery method. - [group:**user**, code:**1200**]: Get user encountered DB error.

---

[API](https://skmtc.net/gmicloud/apis/cluster-engine-api.md) · [All operations](https://skmtc.net/gmicloud/apis/cluster-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gmicloud/cluster-engine-api/versions/bcbab016469f/schema)
