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

# Get the access token for client credentials (GET alias)

> Exchange `X-Client-ID` + `X-Client-Secret` headers for an OAuth2 Bearer access token. This is the **only** endpoint in the public API that accepts client credentials directly — every other endpoint requires the resulting `Authorization: Bearer <token>` header.

A client has one valid token at a time: while its token is valid, every call returns that same token with the seconds it has left in `expires_in`; a new token is issued only once it has expired. Cache the token and call this endpoint again when it expires.

The token carries the scope configured for the client in `oauth_clients` — callers do not choose scopes. The granted scope is returned in the response.

Kept for existing integrations; prefer POST.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/auth/token
openapi: 3.1.0
info:
  title: Leadinfo Data API
  version: 0.1.0
  x-logo:
    url: https://asset.leadinfo.com/assets/email_logo.png
servers:
  - url: https://data.leadinfo.com
    description: Production
security: []
paths:
  /v1/auth/token:
    get:
      tags:
        - auth
      summary: Get the access token for client credentials (GET alias)
      description: >-
        Exchange `X-Client-ID` + `X-Client-Secret` headers for an OAuth2 Bearer
        access token. This is the **only** endpoint in the public API that
        accepts client credentials directly — every other endpoint requires the
        resulting `Authorization: Bearer <token>` header.


        A client has one valid token at a time: while its token is valid, every
        call returns that same token with the seconds it has left in
        `expires_in`; a new token is issued only once it has expired. Cache the
        token and call this endpoint again when it expires.


        The token carries the scope configured for the client in `oauth_clients`
        — callers do not choose scopes. The granted scope is returned in the
        response.


        Kept for existing integrations; prefer POST.
      operationId: get_access_token_v1_auth_token_get
      parameters:
        - name: X-Client-ID
          in: header
          required: false
          schema:
            type: string
            title: X-Client-Id
        - name: X-Client-Secret
          in: header
          required: false
          schema:
            type: string
            title: X-Client-Secret
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenResponse'
        '401':
          description: Invalid or missing client credentials.
        '422':
          description: Invalid request.
        '429':
          description: Too many token requests for this client.
components:
  schemas:
    AccessTokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
          description: The generated access token
        expires_in:
          type: integer
          title: Expires In
          description: Time in seconds until the token expires
        token_type:
          type: string
          title: Token Type
          description: The type of the token, typically 'Bearer'
          default: Bearer
        scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Scope
          description: >-
            Space-separated scopes granted on the token, as returned by the
            OAuth server (the client's configured scope).
      type: object
      required:
        - access_token
        - expires_in
      title: AccessTokenResponse

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.