---
title: "Deny a pending device login (session only)"
method: POST
path: "/v1/cli-auth/device/{userCode}/deny"
tags: ["Account"]
---

# Deny a pending device login (session only)

`POST /v1/cli-auth/device/{userCode}/deny`

## Request

- Base URL: `https://api.openrelay.inc`
- URL: `https://api.openrelay.inc/v1/cli-auth/device/{userCode}/deny`
- Auth: HTTP bearer

Marks the code denied; the polling CLI gets access_denied and stops. Irreversible for that code (a fresh `orl auth login` starts a new one).

Requires the `self.update` permission. See [Permissions](https://docs.openrelay.inc/docs/permissions) for the roles and API key permissions that include it.

## Path parameters

- `userCode` string, required

## Response `204`

Denied

## Other responses

- `401`: Missing or invalid API key
- `404`: Resource not found
- `409`: The request conflicts with existing state
- `429`: The request is invalid

## Changes

- **2026-10-26** `7fe59d94a9f5`: 4 info
  - added the optional property `requestId` to the response with the `401` status
  - added the optional property `requestId` to the response with the `404` status
  - added the optional property `requestId` to the response with the `409` status
  - added the optional property `requestId` to the response with the `429` status
- **2026-10-21** `dc9750cb25b5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openrelay/apis/openrelay-api/changes/v1/cli-auth/device/:userCode/deny/post.md)

---

[API](https://skmtc.dev/openrelay/apis/openrelay-api.md) - [All operations](https://skmtc.dev/openrelay/apis/openrelay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openrelay/apis/openrelay-api/revisions/7fe59d94a9f5?raw)
