---
title: "Device authorization request"
url: "https://nov18-dev.movespot.fyi/apis/konnect-identity-internal-3/versions/4156893f-a5db-4eb8-8deb-93f18fa8fbfa/operations/post-oauth-device-authorize"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-identity-internal-3/versions/4156893f-a5db-4eb8-8deb-93f18fa8fbfa.md

# Device authorization request

`POST` `/internal/oauth/device/authorize`

Operation ID: `post-oauth-device-authorize`

Initiates a device authorization workflow, generating and returning a unique device verification code. See https://www.rfc-editor.org/rfc/rfc8628#section-3.1 for details.

## Request body (required)

Content types: `application/x-www-form-urlencoded`

## Responses

- `200` - Device authorization response
- `400` - Bad Request

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Identity
  version: 3.0.2
servers:
  - url: https://global.api.konghq.com/v3
    description: Global Base URL
paths:
  /internal/oauth/device/authorize:
    post:
      operationId: post-oauth-device-authorize
      summary: Device authorization request
      description: >-
        Initiates a device authorization workflow, generating and returning a
        unique device verification code.

        See https://www.rfc-editor.org/rfc/rfc8628#section-3.1 for details.
      requestBody:
        description: The request schema for the device authorization request.
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  description: The client identifier.
                  type: string
                scope:
                  description: The scope of the access request.
                  type: string
              required:
                - client_id
      responses:
        "200":
          $ref: "#/components/responses/DeviceAuthorizationResponse"
        "400":
          $ref: "#/components/responses/DeviceAuthorizationGrantAuthorizeBadRequest"
      security:
        - {}
      tags:
        - Device Authorization Grant
security:
  - {}
components:
  responses:
    DeviceAuthorizationResponse:
      description: Device authorization response
      content:
        application/json:
          schema:
            type: object
            properties:
              device_code:
                description: The device verification code.
                type: string
              user_code:
                description: The end-user verification code.
                type: string
              verification_uri:
                description: The end-user verification URI on the authorization server.
                type: string
              verification_uri_complete:
                description: A verification URI that includes the "user_code".
                type: string
              expires_in:
                description: The lifetime in seconds of the "device_code" and "user_code".
                type: integer
              interval:
                description: The minimum amount of time in seconds that the client should wait
                  between polling requests to the token endpoint.
                type: integer
            example:
              device_code: GmRhmhcxhwAzkoEqiMEg_DnyEysNkuNhszIySk9eS
              user_code: WDJB-MJHT
              verification_uri: https://example.com/device
              verification_uri_complete: https://example.com/device?user_code=WDJB-MJHT
              expires_in: 1800
              interval: 5
            required:
              - device_code
              - user_code
              - verification_uri
              - expires_in
            title: Device Authorization Response
    DeviceAuthorizationGrantAuthorizeBadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            allOf:
              - $ref: "#/components/schemas/BaseDeviceAuthorizationGrantBadRequest"
              - $ref: "#/components/schemas/DeviceAuthorizationGrantAuthorizeError"
  schemas:
    BaseDeviceAuthorizationGrantBadRequest:
      type: object
      properties:
        error_description:
          description: Human-readable text providing additional information, used to
            assist the client developer in understanding the error that
            occurred.
          type: string
        error_uri:
          description: A URI identifying a human-readable web page with information about
            the error, used to provide the client developer with additional
            information about the error.
          type: string
      title: Base Device Authorization Grant Bad Request
    DeviceAuthorizationGrantAuthorizeError:
      description: The error response for the device authorization grant request.
      type: object
      properties:
        error:
          description: >-
            A single error code from the following enum.

              invalid_request
                 The request is missing a required parameter, includes an unsupported parameter value (other than grant type),
                 repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the
                 client, or is otherwise malformed.

              invalid_client
                 Client authentication failed (e.g., unknown client, no client authentication included, or unsupported
                 authentication method).

              invalid_grant
                 The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is
                 invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to
                 another client.

              unauthorized_client
                 The authenticated client is not authorized to use this authorization grant type.

              unsupported_grant_type
                 The authorization grant type is not supported by the authorization server.

              invalid_scope
                 The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.
          type: string
          enum:
            - invalid_request
            - invalid_client
            - invalid_grant
            - unauthorized_client
            - unsupported_grant_type
            - invalid_scope
      required:
        - error
      title: Device Authorization Grant Authorize Error
```
