Get all active grants

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
GET /api/my-account/grants

Retrieve all active application grants for the user. A logto-verification-id in header is required for checking grant details.

Query parameters

  • appType string

    Optional application type filter. Use 'firstParty' to return grants from first-party applications only, or 'thirdParty' for third-party applications only.

    Values are firstParty or thirdParty.

Responses

  • 200 application/json

    Return a list of active application grants of the user.

    Hide response attribute Show response attribute object
    • grants array[object] Required
      Hide grants attributes Show grants attributes object
      • id string Required
      • payload object Required
        Hide payload attributes Show payload attributes object
        • exp number Required
        • iat number Required
        • jti string Required
        • kind string("Grant") Required
        • clientId string Required
        • accountId string Required
      • expiresAt number Required
      • application object Required
        Hide application attributes Show application attributes object
        • id string Required

          Minimum length is 1, maximum length is 21.

        • name string Required

          Minimum length is 1, maximum length is 256.

  • 400

    Bad Request

  • 401

    Permission denied, the verification record is invalid or the session does not have the required scope to access grant details.

  • 403

    Forbidden

  • 500

    Internal Server Error

GET /api/my-account/grants
curl \
 --request GET 'https://[tenant_id].logto.app/api/my-account/grants' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "grants": [
    {
      "id": "string",
      "payload": {
        "exp": 42.0,
        "iat": 42.0,
        "jti": "string",
        "kind": "string",
        "clientId": "string",
        "accountId": "string"
      },
      "expiresAt": 42.0,
      "application": {
        "id": "string",
        "name": "string"
      }
    }
  ]
}