---
title: "Token"
method: POST
path: "/auth/token"
tags: ["authentication"]
---

# Token

`POST /auth/token`

## Request

- Base URL: `https://api.threadchain.pro` (the document declares no server; this is the origin it was published from)
- URL: `https://api.threadchain.pro/auth/token`
- Auth: none declared

OAuth2 compatible token endpoint for Swagger UI Authorize (same flow as /login).

## Request body `application/x-www-form-urlencoded`

- BodyTokenAuthTokenPost
  - `grant_type` string, nullable
  - `username` string, required
  - `password` string, password, required
  - `scope` string
  - `client_id` string, nullable
  - `client_secret` string, password, nullable

## Response `200`

Successful Response

- AuthResponse: Signup may require OTP; login returns JWT when credentials are valid.
  - `access_token` string, nullable
  - `token_type` string
  - `requires_otp` boolean
  - `email` string, nullable
  - `verification_email_delivered` boolean, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/threadchain/apis/threadchain-backend.md) - [All operations](https://skmtc.dev/threadchain/apis/threadchain-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/threadchain/apis/threadchain-backend/revisions/8ee288a7e6bd?raw)
