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

# Whether the person has entered the device flow's code

> `pending` until they enter it on GitHub, then `done` with their GitHub `login`, or `expired` or `denied`. GitHub is asked at most once per its interval, however often this is. Needs the `publish` scope, and the flow has to be yours (404).



## OpenAPI

````yaml /api-reference/openapi.json get /me/github/device/{id}
openapi: 3.1.0
info:
  title: Patch API
  version: 1.0.0
  description: >-
    The public API behind patch.gg, the desktop app and pch. Changes within v1
    are additive only. Errors are { error: { code, message, details } }; branch
    on code.
servers:
  - url: https://patch.gg/api/v1
security: []
paths:
  /me/github/device/{id}:
    get:
      tags:
        - GitHub
      summary: Whether the person has entered the device flow's code
      description: >-
        `pending` until they enter it on GitHub, then `done` with their GitHub
        `login`, or `expired` or `denied`. GitHub is asked at most once per its
        interval, however often this is. Needs the `publish` scope, and the flow
        has to be yours (404).
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      responses:
        '200':
          description: Where it stands
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubDeviceState'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: GitHub didn't answer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    GithubDeviceState:
      type: object
      properties:
        state:
          type: string
          enum:
            - pending
            - done
            - expired
            - denied
        login:
          type: string
          description: Their GitHub login, once done
      required:
        - state
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key (pch_...) or the token from pch login.

````

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