---
title: "Get Access Token"
method: POST
path: "/auth/accessToken"
tags: ["Authentication"]
---

# Get Access Token

`POST /auth/accessToken`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/auth/accessToken`
- Auth: API key in header `x-speakai-key`

This endpoint allows you to obtain an access token by providing the necessary authentication credentials.

The request body for this endpoint should include the your authentication credentials. Upon successful authentication, the server will respond with a status of "success" and provide the your email, access token, and refresh token in the response data.

**Request rules.** The request body is entirely optional: you can post an empty JSON object. Authentication comes from your API key in the x-speakai-key request header, not from the body, and a missing or invalid key returns 401. A deactivated account returns 200 with a deactivated status rather than tokens. This endpoint is rate limited to 5 requests per minute per IP address.

## Request body

- object
  - `deviceType` 'web' | 'android' | 'ios' | 'zapier' | 'api' | 'desktop': Labels the kind of client requesting the token so the resulting session is identified correctly in your login history. Leave it out and the session is labeled as an API session. Send zapier when you want a plain token pair with no session recorded; in that case the refresh token you get back cannot be exchanged later, so request a new access token instead of refreshing. Any value outside the accepted list is rejected when the session is saved, and you still get a working access token but no session record and no usable refresh token. Optional string. Defaults to api when you omit it or send an empty value. Only web, android, ios, zapier, api and desktop are stored successfully.

## Response `200`

OK

- object
  - `status` string
  - `data` object
    - `email` string
    - `accessToken` string
    - `refreshToken` string

## Other responses

- `404`: Not Found

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
