---
title: "Deny a device authorization"
method: POST
path: "/v1/auth/device/deny"
tags: ["Account"]
---

# Deny a device authorization

`POST /v1/auth/device/deny`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/auth/device/deny`
- Auth: API key in cookie `__Host-better-auth.session_token`

Denies a pending device login so the polling client stops with access_denied.

## Request body

- object
  - `userCode` string, required: User code shown on the device being denied (dashes ignored).

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `status` 'denied', required: The device authorization is denied.

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

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