POST/api/auth/device/denyAuthenticated

Deny a device sign-in request

The signed-in user denies the pending device authorization request (RFC 8628) their user code names: the device's next poll of the token endpoint answers access_denied, and the code cannot be approved any more. Nothing is granted and the app's existing authorization (if any) is left as it was. Unknown codes count towards the same limits as POST /api/auth/device/lookup.

operationId post_api_auth_device_denyAuthentication

Authentication & permissionsAuthenticated

Any authenticated user

Accepted credentials
Who may call
Any authenticated user

Request body

Required — The user code of the request to deny.

application/json
DeviceUserCodeRequest
PropertyTypeDescription
user_code*string

The user code shown on the device, as the user typed it: case-insensitive, dashes and spaces ignored.

minLength: 1maxLength: 32

JSONExample
"user_code""BCDF-GHJK"

Responses

application/json
DeviceAuthorizationDecisionResponse
PropertyTypeDescription
success*true
message*string
decision*"approved" | "denied"
client_app_id*string

minLength: 2maxLength: 64pattern: ^[a-z0-9_-]*$

scopestring | null | null

On approval: the granted scope (null for a plain OAuth 2.1 grant)

JSONExample
"success"true
"message""string"
"decision""approved"
"client_app_id""string"
"scope""string"

Example request

bashcurl
curl -X POST 'https://auth.botreeinc.com/api/auth/device/deny' \
  -b 'refresh_token_<auth_server_app_id>=<value>' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_code": "BCDF-GHJK"
}'
POST /api/auth/device/deny | Botree Auth API