---
title: "Fetches an authentication token for a user."
method: POST
path: "/v4/auth/token"
tags: ["Auth"]
---

# Fetches an authentication token for a user.

`POST /v4/auth/token`

## Request body

- FetchTokenRequest — Request body for the FetchToken endpoint.
  - `userId` integer — The user ID to fetch a token for.
  - `secretKey` string, nullable — The secret key for token generation.

## Response `200`

OK

- Token
  - `authToken` string, nullable
  - `hardExpirationTime` string, date-time

---

[API](https://skmtc.dev/tradera/apis/tradera-api.md) · [All operations](https://skmtc.dev/tradera/apis/tradera-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tradera/tradera-api/revisions/b5f3e81e36e1/schema)
