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

# Create a machine access token

> Exchange machine credentials for a bearer access token.

The first call of every integration: send ``client_id`` and
``client_secret`` (form-encoded, ``grant_type=client_credentials``) and
receive ``access_token`` with ``expires_in`` seconds. Pass it as
``Authorization: Bearer <token>`` on all other endpoints, cache it, and
re-exchange shortly before expiry.

Credentials may instead be presented via HTTP Basic auth
(``Authorization: Basic base64(client_id:client_secret)``) per RFC 6749
§2.3.1 — use one method per request, not a mix. Generated OAuth2 clients
(e.g. Workato's connector SDK) default to Basic.



## OpenAPI

````yaml https://api.summation.com/openapi.json post /v1/auth/m2m/token
openapi: 3.1.0
info:
  title: summation-api public API
  version: 0.1.0
servers: []
security: []
tags:
  - name: Auth
    description: Machine authentication for API clients.
  - name: Tenant
    description: Organization and tenant context resolved by summation-api.
  - name: Projects
    description: Project resources.
  - name: Conversations
    description: Conversation and message resources.
  - name: Reports
    description: Report resources and report operations.
  - name: Runs
    description: Project run history and execution status.
  - name: Playbooks
    description: Playbook resources.
  - name: Files
    description: Project file resources.
  - name: Catalog Entries
    description: Project-scoped data asset attachments.
  - name: Data Connectors
    description: Reusable external data source connections.
  - name: App Connectors
    description: External app connectors whose tools the agent can use during chat.
  - name: Tables
    description: Canonical table metadata and catalog.
  - name: Views
    description: Canonical Summation view metadata and catalog.
  - name: Query Executions
    description: Read-only SQL query execution.
  - name: Grid
    description: Materialized grid status, sync, and lineage.
  - name: Schedules
    description: Schedule and schedule run inspection.
paths:
  /v1/auth/m2m/token:
    post:
      tags:
        - Auth
      summary: Create a machine access token
      description: |-
        Exchange machine credentials for a bearer access token.

        The first call of every integration: send ``client_id`` and
        ``client_secret`` (form-encoded, ``grant_type=client_credentials``) and
        receive ``access_token`` with ``expires_in`` seconds. Pass it as
        ``Authorization: Bearer <token>`` on all other endpoints, cache it, and
        re-exchange shortly before expiry.

        Credentials may instead be presented via HTTP Basic auth
        (``Authorization: Basic base64(client_id:client_secret)``) per RFC 6749
        §2.3.1 — use one method per request, not a mix. Generated OAuth2 clients
        (e.g. Workato's connector SDK) default to Basic.
      operationId: issue_m2m_token
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_issue_m2m_token'
      responses:
        '200':
          description: Access token issued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_issue_m2m_token:
      properties:
        grant_type:
          type: string
          title: Grant Type
          default: client_credentials
        client_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Id
          description: OAuth client id for the machine client.
        client_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Secret
          description: OAuth client secret for the machine client.
        scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Scope
          description: Optional. Leave empty to use SUM_API_M2M_REQUIRED_SCOPES from .env.
      type: object
      title: Body_issue_m2m_token
    TokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
          description: 'Bearer token to send as Authorization: Bearer <token>.'
        token_type:
          type: string
          title: Token Type
          description: Token type for the Authorization header, e.g. 'bearer'.
          default: bearer
        expires_in:
          type: integer
          title: Expires In
          description: Token lifetime in seconds; re-exchange shortly before expiry.
        scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Scope
          description: Space-delimited scopes granted to the token.
      type: object
      required:
        - access_token
        - expires_in
      title: TokenResponse
      description: OAuth2 client-credentials token response (RFC 6749 §5.1).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````