---
title: "Exchange credentials for an API token"
method: POST
path: "/api/v1/auth/token"
---

# Exchange credentials for an API token

`POST /api/v1/auth/token`

## Request

- Base URL: `https://memchats.com`
- URL: `https://memchats.com/api/v1/auth/token`
- Auth: none required

Does not require authentication. grant_type is one of password, refresh_token, apple_identity_token (native Sign in with Apple) or authorization_code (the code returned to the mobile app by /api/v1/auth/authorize, with its PKCE code_verifier and the app redirect_uri). Optional offline: true (password and apple_identity_token) adds the offline_access scope, so the refresh token is an offline token that survives 30 days without use; refresh_token keeps the scope of the token it renews.

## Response `200`

Token

## Other responses

- `401`: Bad credentials

---

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