---
title: Get a device authorization URL
description: Initiate the CLI Auth flow by obtaining a device code and verification URLs.
descriptions:
  device_authorization:
    client_id: The WorkOS client ID for your application.
  device_authorization_response:
    device_code: >-
      A unique identifier for this authorization request. Use this when polling
      the token endpoint.
    user_code: 'A short, user-friendly code that users enter to authorize the device.'
    verification_uri: The URL where users can enter the user code to authorize the device.
    verification_uri_complete: 'A URL with the user code pre-filled, allowing one-click authorization.'
    expires_in: >-
      The lifetime of the device code and user code in seconds. The default is 5
      minutes.
    interval: >-
      The minimum interval in seconds between token requests. The default is 5
      seconds.
reference:
  curl:
    - key: device-authorization
      id: device_authorization_request
      url: /reference/authkit/cli-auth/device-authorization
      title: /user_management/authorize/device
      type: POST
      parameters:
        - key: client_id
          type: string
          description: (device_authorization.client_id)
      returns:
        - key: device_code
          type: string
          description: (device_authorization_response.device_code)
        - key: user_code
          type: string
          description: (device_authorization_response.user_code)
        - key: verification_uri
          type: string
          description: (device_authorization_response.verification_uri)
        - key: verification_uri_complete
          type: string
          description: (device_authorization_response.verification_uri_complete)
        - key: expires_in
          type: integer
          description: (device_authorization_response.expires_in)
        - key: interval
          type: integer
          description: (device_authorization_response.interval)
originalPath: >-
  .tmp-workos-clone/packages/docs/content/reference/authkit/cli-auth/device-authorization.mdx
---

## Get device authorization URL

Initiates the CLI Auth flow by requesting a device code and verification URLs. This endpoint implements the OAuth 2.0 Device Authorization Flow ([RFC 8628](https://datatracker.ietf.org/doc/html/rfc8628)) and is designed for command-line applications or other devices with limited input capabilities.

<CodeBlock referenceId="device_authorization_request">
  <CodeBlockTab title="Request" file="device-authorization-request" />
  <CodeBlockTab title="Response" file="device-authorization-response" />
</CodeBlock>
