---
title: "Start a customer-approved agent connection (when self-service is enabled)."
method: POST
path: "/oauth/device_authorization"
---

# Start a customer-approved agent connection (when self-service is enabled).

`POST /oauth/device_authorization`

## Request

- Base URL: `https://paperagent.dev`
- URL: `https://paperagent.dev/oauth/device_authorization`
- Auth: none required

## Request body

- object
  - `client_id` string, required
  - `scope` string
  - `resource` string

## Response `200`

Device code and browser link.

- object
  - `device_code` string, required
  - `user_code` string, required
  - `verification_uri` string, required
  - `verification_uri_complete` string, required
  - `expires_in` 600, required
  - `interval` 5, required

## Other responses

- `400`: OAuth error: authorization_pending, slow_down, access_denied, expired_token, invalid_grant, or invalid_scope. Device codes expire in 600 seconds; poll every 5 seconds, adding 5 on slow_down.

---

[API](https://skmtc.dev/paperagent/apis/paperagent-rest-api.md) · [All operations](https://skmtc.dev/paperagent/apis/paperagent-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/paperagent/apis/paperagent-rest-api/revisions/388148938051?raw)
