---
updatedAt: 2026-06-12T16:45:46.000Z
agentTools:
  projectIndex: https://docs.hosttools.com/llms.txt
---

# Process Authorization Decision

Processes the user's consent decision (approve or deny). The Host Tools consent page calls this; your app never needs to.
On approval, generates an authorization code and returns the client's redirect_uri with the code (and state) added. On denial, the returned URL carries error=access_denied instead. The consent page then sends the browser to that URL, so your redirect_uri may redirect again (to your app's dashboard, for example).


# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.30.0",
    "title": "Host Tools API Reference",
    "description": "Host Tools API. Supports two authentication methods:\n- **Legacy auth token**: Pass the `authToken` header with your user token\n- **OAuth 2.0 Bearer token**: Pass `Authorization: Bearer <token>` header (see OAuth endpoints below)\n\nOAuth 2.0 is recommended for new integrations. It supports granular scopes and automatic token refresh.\n",
    "contact": {
      "name": "Tom Krones",
      "email": "support@hosttools.com",
      "url": "https://hosttools.com"
    }
  },
  "servers": [
    {
      "url": "https://app.hosttools.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth2 Access Token",
        "description": "OAuth 2.0 access token obtained via the authorization code flow"
      },
      "authToken": {
        "type": "apiKey",
        "in": "header",
        "name": "authToken",
        "description": "Legacy user authentication token (UUID)"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "authToken": []
    }
  ],
  "paths": {
    "/oauth/authorize": {
      "post": {
        "summary": "Process Authorization Decision",
        "description": "Processes the user's consent decision (approve or deny). The Host Tools consent page calls this; your app never needs to.\nOn approval, generates an authorization code and returns the client's redirect_uri with the code (and state) added. On denial, the returned URL carries error=access_denied instead. The consent page then sends the browser to that URL, so your redirect_uri may redirect again (to your app's dashboard, for example).\n",
        "tags": [
          "OAuth"
        ],
        "requestBody": {
          "description": "Consent decision",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "client_id",
                  "redirect_uri",
                  "decision",
                  "csrf_token"
                ],
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "code_challenge": {
                    "type": "string"
                  },
                  "code_challenge_method": {
                    "type": "string"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Token issued with the consent page"
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "deny"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The URL to send the browser to",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "redirectUrl"
                  ],
                  "properties": {
                    "redirectUrl": {
                      "type": "string",
                      "description": "redirect_uri with code and state (approve) or error=access_denied and state (deny)\n"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          }
        }
      }
    }
  }
}
```