Abort interaction

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/experience/abort

Finish the current interaction with an access_denied OAuth error and return the URL that resumes the OIDC flow. Following it redirects the user agent back to the client's redirect URI with the error, preserving the authorization request's state and iss. The endpoint works at any interaction step, including consent, and is intended for flows where the client application owns the user-facing UI, so an abort surfaces there instead of on the hosted experience.

application/json

Body Required

  • reason string(regex)

    Optional human-readable reason, forwarded to the client as the error_description parameter. Must be at most 256 characters and may only contain the characters RFC 6749 §4.1.2.1 allows in error_description: %x20-21 / %x23-5B / %x5D-7E, i.e. printable ASCII except " and \.

    Maximum length is 256. Format should match the following pattern: /^[ !\u0023-\u005B\u005D-\u007E]*$/.

Responses

  • 200 application/json

    The interaction has been aborted. Follow redirectTo to return the OAuth error to the client.

    Hide response attribute Show response attribute object
    • redirectTo string Required
  • 400

    The request body is invalid, e.g. reason is longer than 256 characters or contains a character outside the allowed set; or the interaction session is missing or in an invalid state.

POST /api/experience/abort
curl \
 --request POST 'https://[tenant_id].logto.app/api/experience/abort' \
 --header "Content-Type: application/json" \
 --data '{
  "reason": "string"
}'
Request examples
{
  "reason": "string"
}
Response examples (200)
{
  "redirectTo": "string"
}