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

# Generate Access Token

> Exchange a Client ID and Client Secret for a short-lived access token.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /auth/token
openapi: 3.1.0
info:
  title: Pion API Reference
  description: API for authentication and verification status retrieval.
  version: 1.0.0
servers:
  - url: https://api.wearepion.com
    description: Main production server
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Authenticating with Pion API
  - name: Beans iD Whitelabel API
    description: Endpoints used for the Beans iD Whitelabel API product.
paths:
  /auth/token:
    post:
      tags:
        - Authentication
      summary: Generate Access Token
      description: Exchange a Client ID and Client Secret for a short-lived access token.
      operationId: getAccessToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - clientId
                - clientSecret
              properties:
                clientId:
                  type: string
                  description: A unique ID provided by Pion
                clientSecret:
                  type: string
                  description: A confidential, unique key provided by Pion
      responses:
        '200':
          description: Successful authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    examples:
                      - a1b2c3d4
                  token_type:
                    type: string
                    examples:
                      - Bearer
        '400':
          $ref: '#/components/responses/GenericError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security: []
components:
  responses:
    GenericError:
      description: Generic error response format
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  title:
                    type: string
                  detail:
                    type: string
    UnauthorizedError:
      description: 401 Unauthorised
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  title:
                    type: string
                    examples:
                      - unauthorised
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````