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

# Poll OAuth connection status



## OpenAPI

````yaml api-reference/openapi.json get /connections/connect/{platform}/status/{stateToken}
openapi: 3.1.0
info:
  title: Tibbie
  version: '1.0'
  description: REST API for managing posts and connections on Tibbie.
servers:
  - url: https://tibbie.co/api/v1
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: User
  - name: Connections
  - name: Posts
  - name: Media
paths:
  /connections/connect/{platform}/status/{stateToken}:
    get:
      tags:
        - Connections
      summary: Poll OAuth connection status
      operationId: connectionOAuth.status
      parameters:
        - name: platform
          in: path
          required: true
          schema:
            type: string
        - name: stateToken
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        const: pending
                      expires_in:
                        type: integer
                    required:
                      - status
                      - expires_in
                  - type: object
                    properties:
                      status:
                        type: string
                        const: failed
                    required:
                      - status
                  - type: object
                    properties:
                      status:
                        type: string
                        const: completed
                      connection:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          provider:
                            type: string
                          username:
                            type:
                              - string
                              - 'null'
                          display_name:
                            type:
                              - string
                              - 'null'
                          avatar:
                            type:
                              - string
                              - 'null'
                          needs_reconnection:
                            type: boolean
                          created_at:
                            type:
                              - string
                              - 'null'
                            format: date-time
                        required:
                          - id
                          - provider
                          - username
                          - display_name
                          - avatar
                          - needs_reconnection
                          - created_at
                    required:
                      - status
                      - connection
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    const: not_found
                  error_description:
                    type: string
                    const: Connection request not found.
                required:
                  - error
                  - error_description
        '410':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    const: expired
                  error_description:
                    type: string
                    const: >-
                      This connection request has expired. Please initiate a new
                      one.
                required:
                  - error
                  - error_description
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.