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

# Obtain authentication M2M tokens

> Obtain an authentication M2M token with the access token.



## OpenAPI

````yaml https://sandbox-api.borderless.xyz/v1/api-json post /v1/auth/m2m/token
openapi: 3.0.0
info:
  title: Borderless API
  description: The Borderless API documentation.
  version: '1.0'
  contact: {}
servers:
  - url: https://sandbox-api.borderless.xyz
security: []
tags: []
paths:
  /v1/auth/m2m/token:
    post:
      tags:
        - Authentication
      summary: Obtain authentication M2M tokens
      description: Obtain an authentication M2M token with the access token.
      operationId: AuthController_signIn
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthM2MSignInDto'
      responses:
        '201':
          description: >-
            An authentication M2M token with the access token, token type, and
            the remaining time (in seconds) until expiration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthM2MTokenEntity'
components:
  schemas:
    AuthM2MSignInDto:
      type: object
      properties:
        clientId:
          type: string
          description: >-
            The client Id for M2M authentication. Can be obtained this from
            Dashboard. Learn more at [M2M Authentication
            Guide](https://docs.buildborderless.com/docs/generating-api-keys).
        clientSecret:
          type: string
          description: >-
            The client Secret for M2M authentication. Can be obtained this from
            Dashboard. Learn more at [M2M Authentication
            Guide](https://docs.buildborderless.com/docs/generating-api-keys).
        piiAccess:
          enum:
            - all
            - redacted
          type: string
          description: PII access level for the token. Defaults to all if not provided.
          example: all
      required:
        - clientId
        - clientSecret
    AuthM2MTokenEntity:
      type: object
      properties:
        accessToken:
          type: string
        tokenType:
          type: string
        expiresIn:
          type: number
        piiAccess:
          enum:
            - all
            - redacted
          type: string
      required:
        - accessToken
        - tokenType
        - expiresIn
        - piiAccess

````