# Retrieve a token 

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /auth/connect/token:
    post:
      summary: 'Retrieve a token '
      deprecated: false
      description: ''
      tags:
        - Version 3/Authentication
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  description: 'The grant type of the token request. '
                  example: client_credentials
                  type: string
                client_id:
                  description: 'Your Banyan supplied client id. '
                  example: myclientid
                  type: string
                client_secret:
                  description: 'Your Banyan supplied client secret. '
                  example: myclientsecret
                  type: string
                clientrefnum:
                  description: The client ref number this token should be associated with.
                  example: ''
                  type: string
              required:
                - grant_type
                - client_id
                - client_secret
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: The JWT you will use in your Authorization header
                  token_type:
                    type: string
                    description: The type of Token.
                  expires_in:
                    type: integer
                    description: When the token expires.
                  scope:
                    type: string
                    description: 'Scopes (permissions) this token has. '
                required:
                  - access_token
                  - token_type
                  - expires_in
                  - scope
                x-apidog-orders:
                  - access_token
                  - token_type
                  - expires_in
                  - scope
              examples:
                '1':
                  summary: Success
                  value:
                    access_token: >-
                      eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
                    token_type: Bearer
                    expires_in: 3599
                    scope: shipments.view shipments.edit
                '3':
                  summary: Success
                  value:
                    error: invalid_request
                    error_description: The mandatory 'grant_type' parameter is missing.
                    error_uri: https://documentation.openiddict.com/errors/ID2029
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  error_description:
                    type: string
                  error_uri:
                    type: string
                required:
                  - error
                  - error_description
                  - error_uri
                x-apidog-orders:
                  - error
                  - error_description
                  - error_uri
              example:
                error: invalid_request
                error_description: The mandatory 'grant_type' parameter is missing.
                error_uri: https://documentation.openiddict.com/errors/ID2029
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  error_description:
                    type: string
                  error_uri:
                    type: string
                required:
                  - error
                  - error_description
                  - error_uri
                x-apidog-orders:
                  - error
                  - error_description
                  - error_uri
              example:
                error: invalid_client
                error_description: The specified client credentials are invalid.
                error_uri: https://documentation.openiddict.com/errors/ID2055
          headers: {}
          x-apidog-name: Unauthorized
      security: []
      x-apidog-folder: Version 3/Authentication
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/668040/apis/api-10126268-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://ws.integration.banyantechnology.com
    description: Integration Env
security: []

```
