Get connector's authorization URI

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Logto API references MCP server": {
  "url": "https://openapi.logto.io/mcp"
}
Close
POST /api/connectors/{connectorId}/authorization-uri

Get authorization URI for specified connector by providing redirect URI and randomly generated state.

Path parameters

  • connectorId string Required

    The unique identifier of the connector.

application/json

Body Required

  • state string Required

    A random string generated on the client side to prevent CSRF (Cross-Site Request Forgery) attacks.

  • redirectUri string Required

    The URI to navigate back to after the user is authenticated by the connected social identity provider and has granted access to the connector.

Responses

  • 200 application/json

    Successfully built authorization URI.

    Hide response attributes Show response attributes object
    • redirectTo string(url) Required
    • redirectUri

      The URI to navigate for authentication and authorization in the connected social identity provider.

  • 400

    Unable to build authorization URI.

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    The connector with the specified ID does not exist.

POST /api/connectors/{connectorId}/authorization-uri
curl \
 --request POST 'https://[tenant_id].logto.app/api/connectors/{connectorId}/authorization-uri' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"state":"string","redirectUri":"string"}'
Request examples
{
  "state": "string",
  "redirectUri": "string"
}
Response examples (200)
{
  "redirectTo": "string"
}