---
title: "Create authentication token"
method: POST
path: "/rest/api/v1/createauthtoken"
tags: ["Authentication"]
---

# Create authentication token

`POST /rest/api/v1/createauthtoken`

Creates an authentication token for the authenticated user. These are
specifically intended to be used with the [Web SDK](https://developers.glean.com/web).

Note: The tokens generated from this endpoint are **not** valid tokens
for use with the Client API (e.g. `/rest/api/v1/*`).

## Response `200`

OK

- CreateAuthTokenResponse
  - `token` string, required — An authentication token that can be passed to any endpoint via Bearer Authentication
  - `expirationTime` integer, required — Unix timestamp for when this token expires (in seconds since epoch UTC).

## Other responses

- `400` — Invalid Request
- `401` — Not Authorized
- `429` — Too Many Requests

## Changes

- **2026-07-22** `12f321ae935e` — 1 info
  - the endpoint scheme security `APIToken` was added to the API
- **2026-07-22** `90948cb39546` — 1 info
  - the endpoint scheme security `APIToken` was removed from the API
- **2026-07-21** `972a5118199e` — 1 info
  - the endpoint scheme security `APIToken` was added to the API
- **2026-07-21** `2d62172604d1` — 1 info
  - the endpoint scheme security `APIToken` was removed from the API
- **2026-06-22** `08c17c9175d0` — 1 info
  - the endpoint scheme security `APIToken` was added to the API

[Full history](https://skmtc.dev/gleanwork/apis/glean-api/changes/rest/api/v1/createauthtoken/post.md)

---

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