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

# Get access token

> Validate API key and get access token



## OpenAPI

````yaml swagger.mintlify.yaml post /api/token
openapi: 3.0.1
info:
  title: 3P API
  description: A unified payment processing API that aggregates multiple payment providers
  contact: {}
  version: '1.0'
servers:
  - url: https://api.use3p.com
security: []
paths:
  /api/token:
    post:
      tags:
        - auth
      summary: Get access token
      description: Validate API key and get access token
      requestBody:
        description: API key validation data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dto.GetAccessTokenRequest'
        required: true
      responses:
        '200':
          description: Access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/oauth2.Token'
components:
  schemas:
    dto.GetAccessTokenRequest:
      properties:
        secret_key:
          type: string
      type: object
    oauth2.Token:
      type: object
      properties:
        access_token:
          type: string
          description: |-
            AccessToken is the token that authorizes and authenticates
            the requests.
        expires_in:
          type: integer
          description: |-
            ExpiresIn is the OAuth2 wire format "expires_in" field,
            which specifies how many seconds later the token expires,
            relative to an unknown time base approximately around "now".
            It is the application's responsibility to populate
            `Expiry` from `ExpiresIn` when required.
        expiry:
          type: string
          description: |-
            Expiry is the optional expiration time of the access token.

            If zero, [TokenSource] implementations will reuse the same
            token forever and RefreshToken or equivalent
            mechanisms for that TokenSource will not be used.
        refresh_token:
          type: string
          description: |-
            RefreshToken is a token that's used by the application
            (as opposed to the user) to refresh the access token
            if it expires.
        token_type:
          type: string
          description: |-
            TokenType is the type of token.
            The Type method returns either this or "Bearer", the default.

````