> ## Documentation Index
> Fetch the complete documentation index at: https://developer.amplify.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate an access token

> Exchange an Amplify API key for a Bearer access token.

Exchange the API key created in **Settings → Developer Tools → API Keys** for an access token. This endpoint does not use Bearer authentication.

Use the returned token in the standard authorization header:

```http theme={null}
Authorization: Bearer YOUR_ACCESS_TOKEN
```


## OpenAPI

````yaml POST /v1/auth
openapi: 3.1.0
info:
  title: Amplify Customer API
  version: 1.0.0
  description: |-
    Canonical contract for the Amplify customer-facing API. This YAML file is
    the source of truth for Postman and Mintlify. Operations marked with
    x-amplify-validation-status: pending were migrated from the legacy Postman
    collection and must be validated before their contract is considered final.
servers:
  - url: https://api.amplify.xyz
    description: Production
  - url: https://dev-api.amplify.xyz
    description: Development
security: []
tags:
  - name: Authentication
  - name: Fax
  - name: Send Faxes
  - name: Receive Faxes
  - name: Manage Faxes
  - name: Workspace
  - name: Numbers
  - name: Contacts
  - name: Documents
  - name: Templates
paths:
  /v1/auth:
    post:
      tags:
        - Authentication
      summary: Generate an access token
      description: Exchanges an Amplify API key for a Bearer access token.
      operationId: generateAccessToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateAccessTokenRequest'
            example:
              api_secret_key: <string>
      responses:
        '200':
          description: Access token generated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateAccessTokenResponse'
              example:
                status: 1
                message: Token Generate Successfully
                data:
                  access_token: YOUR_ACCESS_TOKEN
                  token_type: Bearer
                  expires_in: 86400
        '401':
          description: The supplied API secret key is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidApiKeyResponse'
              example:
                status: 0
                message: API Secret Key is invalid.
      security: []
components:
  schemas:
    GenerateAccessTokenRequest:
      type: object
      additionalProperties: false
      required:
        - api_secret_key
      properties:
        api_secret_key:
          type: string
          description: API key created in the Amplify dashboard.
          example: <string>
    GenerateAccessTokenResponse:
      type: object
      additionalProperties: false
      required:
        - status
        - message
        - data
      properties:
        status:
          type: integer
          example: 1
        message:
          type: string
          example: Token Generate Successfully
        data:
          type: object
          additionalProperties: false
          required:
            - access_token
            - token_type
            - expires_in
          properties:
            access_token:
              type: string
              description: Bearer token used for subsequent API requests.
              example: YOUR_ACCESS_TOKEN
            token_type:
              type: string
              const: Bearer
            expires_in:
              type: integer
              description: Token lifetime in seconds.
              example: 86400
    InvalidApiKeyResponse:
      type: object
      additionalProperties: false
      required:
        - status
        - message
      properties:
        status:
          type: integer
          const: 0
        message:
          type: string
          const: API Secret Key is invalid.

````