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

# Poll Device Auth

> Poll OpenAI for the authorization grant tied to a previously-started
device_auth_id, and on success exchange + persist tokens.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/oauth/openai/device/poll
openapi: 3.1.0
info:
  title: faces
  version: 0.101.0
servers: []
security: []
paths:
  /v1/oauth/openai/device/poll:
    post:
      tags:
        - OAuth
      summary: Poll Device Auth
      description: |-
        Poll OpenAI for the authorization grant tied to a previously-started
        device_auth_id, and on success exchange + persist tokens.
      operationId: poll_device_auth_v1_oauth_openai_device_poll_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevicePollRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevicePollResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DevicePollRequest:
      properties:
        device_auth_id:
          type: string
          title: Device Auth Id
      type: object
      required:
        - device_auth_id
      title: DevicePollRequest
    DevicePollResponse:
      properties:
        status:
          type: string
          title: Status
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry After
        chatgpt_account_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chatgpt Account Id
        chatgpt_plan_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Chatgpt Plan Type
        account_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Email
      type: object
      required:
        - status
      title: DevicePollResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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