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

# List OAuth clients



## OpenAPI

````yaml /api-reference/openapi/datasources-api.json get /oauth
openapi: 3.0.0
info:
  title: datasources-api
  version: 0.0.0
  description: |-
    # Errors
    | Error code | Message | HTTP status code | Payload |
    | :--- | :--- | :--- | :--- |
    | number | string | 409 |  |
servers:
  - url: https://api.reelevant.com/v2/datasources/
    description: production
security: []
paths:
  /oauth:
    get:
      tags:
        - OAuthClient
      summary: List OAuth clients
      operationId: list-oauth-client
      parameters:
        - name: page
          in: query
          schema:
            type: number
            default: 1
          required: false
        - name: perPage
          in: query
          schema:
            type: number
            default: 10
          required: false
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      paginationCount:
                        type: number
                      paginationPage:
                        type: number
                      paginationLimit:
                        type: number
                    required:
                      - paginationCount
                      - paginationPage
                      - paginationLimit
                    additionalProperties: false
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                    required:
                      - status
                    additionalProperties: false
                  - $ref: '#/components/schemas/InternalResponse_Array_OAuthClient'
      security:
        - password_auth: []
components:
  schemas:
    InternalResponse_Array_OAuthClient:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/OAuthClient'
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    OAuthClient:
      allOf:
        - type: object
          properties:
            companyId:
              allOf:
                - $ref: '#/components/schemas/ObjectId'
              readOnly: true
            resourceGroupIds:
              type: array
              items:
                $ref: '#/components/schemas/ObjectId'
              readOnly: true
            username:
              type: string
            password:
              type: string
              writeOnly: true
            tokenUrl:
              type: string
            authorizeUrl:
              type: string
            refreshToken:
              type: string
              writeOnly: true
            accessToken:
              type: string
              writeOnly: true
            nextInChainClient:
              $ref: '#/components/schemas/ObjectId'
          required:
            - companyId
            - resourceGroupIds
          additionalProperties: false
        - type: object
          properties:
            id:
              type: string
              readOnly: true
          required:
            - id
          additionalProperties: false
        - type: object
          properties:
            configuration:
              oneOf:
                - type: string
                - $ref: '#/components/schemas/OAuthClientConfiguration'
            nextInChainConfiguration:
              type: string
          required:
            - configuration
          additionalProperties: false
    ObjectId:
      type: string
    OAuthClientConfiguration:
      type: object
      properties:
        method:
          oneOf:
            - type: string
              enum:
                - GET
            - type: string
              enum:
                - POST
        mode:
          allOf:
            - $ref: '#/components/schemas/AuthenticationMode'
          default: refresh_token
        tokenUrl:
          type: string
          pattern: ^(https?):\/\/[^\s$.?#].([^\s]|\x20)*$
          example: https://login.salesforce.com/services/oauth2/token
        authorizeUrl:
          type: string
          pattern: ^(https?):\/\/[^\s$.?#].([^\s]|\x20)*$
          example: https://login.salesforce.com/services/oauth2/authorize
        clientId:
          type: string
        clientSecret:
          type: string
          writeOnly: true
        scopes:
          type: array
          items:
            type: string
        customPayload:
          type: object
          properties:
            tokenUrl:
              type: object
              properties:
                query:
                  type: object
                  properties: {}
                  additionalProperties:
                    type: string
                body:
                  type: object
                  properties: {}
                  additionalProperties:
                    type: string
                headers:
                  type: object
                  properties: {}
                  additionalProperties:
                    type: string
              additionalProperties: false
            authorizeUrl:
              type: object
              properties:
                query:
                  type: object
                  properties: {}
                  additionalProperties:
                    type: string
                body:
                  type: object
                  properties: {}
                  additionalProperties:
                    type: string
                headers:
                  type: object
                  properties: {}
                  additionalProperties:
                    type: string
              additionalProperties: false
          required:
            - tokenUrl
            - authorizeUrl
          additionalProperties: false
          example: '{ payload: { query: { access_type: ''offline'' } } }'
        accessTokenPath:
          type: string
        accessTokenHeader:
          type: string
          example: x-shopify-access-token
          default: authorization
        accessTokenHeaderPrefix:
          type: string
          example: google
        tokenExpiration:
          type: number
      required:
        - tokenUrl
        - clientId
        - clientSecret
        - scopes
      additionalProperties: false
    AuthenticationMode:
      type: string
      enum:
        - password
        - client_credentials
        - refresh_token
        - access_token
        - custom_payload
        - jwt_bearer
  securitySchemes:
    password_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: https://api.reelevant.com/v1/auth/token
          refreshUrl: https://api.reelevant.com/v1/auth/token
          scopes: {}

````