---
title: "POST /v1alpha1/auth/authorize"
method: POST
path: "/v1alpha1/auth/authorize"
tags: ["AuthService"]
---

# POST /v1alpha1/auth/authorize

`POST /v1alpha1/auth/authorize`

## Request

- Base URL: `http://localhost:4000`
- URL: `http://localhost:4000/v1alpha1/auth/authorize`
- Auth: HTTP bearer and API key in header `x-id-api-key`

Authorize a request from an Agent or MCP Server

## Request body

- AuthorizeRequest
  - `resolverMetadataId` string: The resolver metadata id for which authorization is requested.
  - `toolName` string: The MCP Server tool name.
  - `userToken` string: The User context in the form of an id or access token. Mandatory for User Approval Flows.

## Response `200`

OK

- AuthorizeResponse
  - `authorizationCode` string: If authorization is successful, return a code to be used for the token endpoint.

## Other responses

- `default`: Default error response

## Changes

> 18 revisions in range; 7 not diffed.

- **2025-07-28** `63464ebf3f61`: 1 warning, 1 info
  - removed the request property `resolverMetadataId`
  - added the new optional request property `appId`

[Operation history](https://skmtc.dev/agntcy/apis/agntcy-identity-service-api/changes/v1alpha1/auth/authorize/post.md)

---

[API](https://skmtc.dev/agntcy/apis/agntcy-identity-service-api.md) - [All operations](https://skmtc.dev/agntcy/apis/agntcy-identity-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agntcy/apis/agntcy-identity-service-api/revisions/1dc8f8328648?raw)
