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

# Authorization

> <p>Shop/terminal needs to authenticate itself to SONECT. The flow will follow the “Client credentials grant” - the simplest of all the OAuth 2.0 grants and is suitable for machine-to-machine authentication where a specific user’s permission to access data is not required.</p>



## OpenAPI

````yaml 13 post /oauth2/authorize
openapi: 3.0.0
info:
  title: finAPI Access Product - V2
  version: 1.0.0
servers:
  - url: http://127.0.0.1:3000
security: []
tags:
  - name: '** 1. Pre- Requirements  **'
  - name: 'Use Case 1a: Import, Update & get Account info (demo bank)'
  - name: >-
      Use Case 1a: Import, Update & get Account info (demo bank) > 2. Import a
      bank connection
  - name: >-
      Use Case 1a: Import, Update & get Account info (demo bank) > 3. Update
      bank connection
  - name: >-
      Use Case 1a: Import, Update & get Account info (demo bank) > 4. Get
      Accounts & Transactions
  - name: 'Use Case 1b:  Import, Update & get Account info (Real Bank)'
  - name: >-
      Use Case 1b:  Import, Update & get Account info (Real Bank) > 2. Import a
      bank connection
  - name: >-
      Use Case 1b:  Import, Update & get Account info (Real Bank) > 3. Update
      bank connection
  - name: >-
      Use Case 1b:  Import, Update & get Account info (Real Bank) > 4. Get
      Accounts & Transactions
  - name: 'Use Case 2 : Standalone payment'
  - name: 'Use Case 2 : Standalone payment > 2. Create Payment'
  - name: 'Use Case 2 : Standalone payment > 3. Check Payment Status'
  - name: 'Use Case 3 : Payment with accountId'
  - name: 'Use Case 3 : Payment with accountId > 2. Create Payment'
  - name: 'Use Case 3 : Payment with accountId > 3. Check Payment Status'
  - name: 'Use Case 4: Direct debit'
  - name: 'Use Case 4: Direct debit > 2. Create Payment'
  - name: 'Use Case 4: Direct debit > 3. Check Payment Status'
  - name: 'Use Case 5: Standing Orders'
  - name: 'Use Case 5: Standing Orders > 2. Create Payment'
  - name: 'Use Case 5: Standing Orders > 3. Check Payment Status'
  - name: '** Clean up **'
paths:
  /oauth2/authorize:
    post:
      tags:
        - '** 1. Pre- Requirements  **'
      summary: Authorization
      description: >-
        <p>Shop/terminal needs to authenticate itself to SONECT. The flow will
        follow the “Client credentials grant” - the simplest of all the OAuth
        2.0 grants and is suitable for machine-to-machine authentication where a
        specific user’s permission to access data is not required.</p>
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                grant_type: client_credentials
                merchant_id: ''
                device_id: ''
                device_type: terminal
                password: ''
                scope: ''
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  token_type:
                    type: integer
                    description: The Type of Token (Bearer).
                  access_token:
                    type: string
                    description: The Access token.
                  expires_in:
                    type: string
                    description: The Access token Expiration time (86400).
                example:
                  token_type: bearer
                  access_token: ''
                  expires_in: 86400
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````