/{app_slug}/v1/agent-access/authorizations/{handle}/denyAuthDeny an agent authorization
The user pressed Cancel. Send the browser to `redirect_to` (`error=access_denied`).
Path parameters
app_slug*stringThe app slug.
handle*stringThe `request` handle.
Response · 200 Denied.
redirect_to*string · uriSend the browser here: the client's redirect URI with `code` (or `error`), `state` and `iss`.
grant_idstringThe new connection (approve only).
Example: "agr_9xY…"
Example
Request
POST https://api.auth.productcraft.co/{app_slug}/v1/agent-access/authorizations/{handle}/deny
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const agentAuthorizationDecision = await auth.consumer("my-app").agentAccess.authorizations.deny("pcar_Q2xhdWRlLUNvZGUtZXhhbXBsZS1oYW5kbGU");auth.consumer(…).agentAccess.authorizations.deny(handle, options?): Auth.AgentAuthorizationDecision
Response
{
"redirect_to": "string",
"grant_id": "agr_9xY…"
}