> ## Documentation Index
> Fetch the complete documentation index at: https://microstrate-1133-notifications-prefs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuth callback

> Handle OAuth callback after user authorization



## OpenAPI

````yaml /api-reference/endpoint/hub-flows/openapi.json get /hub/integrations/oauth-callback
openapi: 3.0.0
info:
  title: quiva.ai Gateway
  description: API for managing collections, nodes, and workflows in quiva.ai Hub
  version: 0.1.0
  contact:
    name: quiva.ai Support
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Collections
    description: Operations related to collections
  - name: Nodes
    description: Operations related to nodes
  - name: Workflows
    description: Operations related to workflows
  - name: Oauth
    description: Oauth configurations and connections
paths:
  /hub/integrations/oauth-callback:
    get:
      tags:
        - Oauth
      summary: OAuth callback
      description: Handle OAuth callback after user authorization
      operationId: integrationsOauthCallback
      parameters:
        - name: code
          in: query
          required: true
          schema:
            type: string
          description: OAuth authorization code
          example: 4/0AX4XfWgq1P2fJdK8V9L3m...
        - name: state
          in: query
          required: true
          schema:
            type: string
          description: OAuth state parameter
          example: abc123xyz789def456ghi
      responses:
        '200':
          description: OAuth token received and saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OauthConnection'
              example:
                access_token: eyJhbGciOiJSUzI1Ni...
                token_type: Bearer
                refresh_token: dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...
                expiry: '2025-06-01T12:00:00.000000+00:00'
                expires_in: 3600
                sequence: 1
                subject: >-
                  ms.integration.oauth.AC75JGNMJHTRQNXCBDMIAJCJ57HAEWP2RGWXJCIFFGW2K64OKG267A2D.slack.workspace1
                modified: 1748620800
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OauthConnection:
      type: object
      properties:
        access_token:
          type: string
          description: OAuth access token
          example: eyJhbGciOiJSUzI1Ni...
        token_type:
          type: string
          description: Token type (usually Bearer)
          example: Bearer
        refresh_token:
          type: string
          description: OAuth refresh token
          example: ulpL_...
        expiry:
          type: string
          format: date-time
          description: Token expiration time
          example: '2025-05-29T17:09:39.816102+01:00'
        expires_in:
          type: integer
          description: Token expires in seconds
          example: 1800
        sequence:
          type: integer
          description: Message sequence number
          example: 85
        subject:
          type: string
          description: Message subject
          example: >-
            ms.integration.oauth.AC75JGNMJHTRQNXCBDMIAJCJ57HAEWP2RGWXJCIFFGW2K64OKG267A2D.xero.demo
        modified:
          type: integer
          description: Last modified timestamp
          example: 1748533179
      example:
        access_token: eyJhbGciOiJSUzI1Ni...
        expires_in: 1800
        expiry: '2025-05-29T17:09:39.816102+01:00'
        modified: 1748533179
        refresh_token: ulpL_...
        sequence: 85
        subject: >-
          ms.integration.oauth.AC75JGNMJHTRQNXCBDMIAJCJ57HAEWP2RGWXJCIFFGW2K64OKG267A2D.xero.demo
        token_type: Bearer
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````