POST /v1/auth/device/{user_code}/deny
Denies the device login; the CLI's next poll receives `access_denied`.

Authentication

API Key (cookie: __Host-b3os_session)

Path Parameters

user_code string required path
The code the CLI showed, with or without the dash.
Example: "WDJB-MJHT"

Header Parameters

x-b3os-csrf string required header
The `csrf_token` from `GET /v1/auth/session`.
Example: "9f8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d"

Responses

200 The denied device login.
application/json
object string REQUIRED
Enum: device_authorization
user_code string REQUIRED
client_id string REQUIRED
client_name string REQUIRED
scopes string[] REQUIRED
Array of: string
status string REQUIRED
Enum: pending, approved, denied, expired
user_agent string | null REQUIRED
created_at string (date-time) REQUIRED
expires_at string (date-time) REQUIRED
decided_at string (date-time) | null REQUIRED
400 The request failed validation (`invalid_request`, `invalid_url`).
401 Missing, malformed, expired or revoked credentials (`unauthorized`).
403 Authenticated but not allowed (`forbidden`, `egress_denied`).
404 The device code is unknown or expired (`user_code_not_found`).
409 The device login was already approved or denied (`device_authorization_finished`).
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X POST 'https://beta.b3os.org/v1/auth/device/WDJB-MJHT/deny' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'x-b3os-csrf: 9f8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d'
const response = await fetch('https://beta.b3os.org/v1/auth/device/WDJB-MJHT/deny', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "x-b3os-csrf": "9f8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN',    'x-b3os-csrf': '9f8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d'}response = requests.post('https://beta.b3os.org/v1/auth/device/WDJB-MJHT/deny', headers=headers)print(response.json())
200 Response
{  "object": "device_authorization",  "user_code": "WDJB-MJHT",  "client_id": "b3os-cli",  "client_name": "B3OS CLI",  "scopes": [    "*"  ],  "status": "denied",  "user_agent": "b3os-cli/0.1.0 (darwin arm64)",  "created_at": "2026-10-25T22:30:00.000Z",  "expires_at": "2026-10-25T22:45:00.000Z",  "decided_at": "2026-10-25T22:31:10.000Z"}
Ask a question... ⌘I