Auth0 Device Flow API

The Device Flow API from Auth0 — 1 operation(s) for device flow.

OpenAPI Specification

auth0-device-flow-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Auth0 Authentication actions Device Flow API
  description: Auth0 Authentication API. Endpoints for authentication and authorization using OpenID Connect, OAuth 2.0, SAML, WS-Federation, and Passwordless flows.
  version: 1.0.0
servers:
- url: '{auth0_domain}'
  description: The Authentication API is served over HTTPS.
  variables:
    auth0_domain:
      description: Auth0 domain
      default: https://demo.us.auth0.com
tags:
- name: Device Flow
paths:
  /oauth/device/code:
    post:
      operationId: oauth_device_code
      summary: Auth0 Get Device Code
      tags:
      - Device Flow
      description: This is the flow that input-constrained devices use to access an API. Use this endpoint to get a device code.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                  description: Your application's Client ID.
                scope:
                  type: string
                  description: The scopes for which you want to request authorization.
                audience:
                  type: string
                  description: The unique identifier of the target API you want to access.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  device_code:
                    type: string
                    description: The unique code for the device.
                  user_code:
                    type: string
                    description: The code that the user should input at the verification_uri to authorize the device.
                  verification_uri:
                    type: string
                    description: The URL the user should visit to authorize the device.
                  verification_uri_complete:
                    type: string
                    description: The complete URL the user should visit to authorize the device.
                  expires_in:
                    type: integer
                    description: The lifetime (in seconds) of the device_code and user_code.
                  interval:
                    type: integer
                    description: The interval (in seconds) at which the app should poll the token URL to request a token.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '501':
          $ref: '#/components/responses/NotImplemented'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  responses:
    NotImplemented:
      description: Not Implemented
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
    ServiceUnavailable:
      description: Service Unavailable
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
    InternalServerError:
      description: Internal Server Error
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
    MethodNotAllowed:
      description: Method Not Allowed
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string