POST
/api/auth/device/denyAuthenticatedDeny 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_denyAuthenticationAuthentication & permissionsAuthenticated
Any authenticated user
- Accepted credentials
- Auth server session (refresh token cookie)
cookie "refresh_token_<auth_server_app_id>" - Access token (cookie)
cookie "access_token_<auth_server_app_id>" - Access token (Bearer)
Authorization: Bearer <JWT>
- Auth server session (refresh token cookie)
- Who may call
- Any authenticated user
Request body
Required — The user code of the request to deny.
application/json
DeviceUserCodeRequest
| Property | Type | Description |
|---|---|---|
| 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
| Property | Type | Description |
|---|---|---|
| success* | true | |
| message* | string | |
| decision* | "approved" | "denied" | |
| client_app_id* | string | minLength: 2maxLength: 64pattern: ^[a-z0-9_-]*$ |
| scope | string | 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"
}'