---
title: "Deny device code"
method: POST
path: "/api/v1/auth/device/deny"
tags: ["Device Authentication"]
---

# Deny device code

`POST /api/v1/auth/device/deny`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/auth/device/deny`
- Auth: HTTP bearer

Called by the authenticated user in the browser to refuse a device login request they did not start. The waiting CLI stops with 403 on its next poll instead of holding the code open until it expires.

## Request body

- DeviceDenyRequest
  - `userCode` string, required

## Response `200`

Device code denied

## Other responses

- `404`: Code not found or already used

---

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