---
title: "Create temporary auth token"
method: POST
path: "/v2/users/{id}/token"
tags: ["Users"]
---

# Create temporary auth token

`POST /v2/users/{id}/token`

## Request

- Base URL: `https://developers.brandtrack.ai/api.brandtrack.fm`
- URL: `https://developers.brandtrack.ai/api.brandtrack.fm/v2/users/{id}/token`
- Auth: API key in header `x-customer-api-key`
- TypeScript: <https://skmtc.dev/brandtrack/apis/brandtrack-api-documentation/docs/v2/users/:id/token/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a one-time token that allows to access to the account by opening the link provided.
It lasts only 1 hour and any attempting to use this token after 1 hour will result in a 401 Unauthorized response.

## Query parameters

- `page` integer: The page requested. Default to 1.
- `per_page` integer: The number of items per page. Default to 25.
- `order_by` string: The field to order the results by. Default to id.
- `direction` string: The direction method to sort results. Default to asc.

## Headers

- `x-customer-api-key` string

## Response `200`

Sucess

- object
  - `data` object
    - `user_id` integer
    - `token` string
    - `created_at` string
    - `expires_at` string
    - `url` string
    - `requested_by` integer

## Other responses

- `404`: Wrong ID

---

[API](https://skmtc.dev/brandtrack/apis/brandtrack-api-documentation.md) - [All operations](https://skmtc.dev/brandtrack/apis/brandtrack-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/brandtrack/apis/brandtrack-api-documentation/revisions/a2c747489f3a?raw)
