Assign user consent scopes to application.

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/applications/{applicationId}/user-consent-scopes

Assign the user consent scopes to an application by application id

Path parameters

  • applicationId string Required

    The unique identifier of the application.

application/json

Body Required

  • organizationScopes array[string]

    A list of organization scope id to assign to the application. Throws error if any given organization scope is not found.

  • resourceScopes array[string]

    A list of resource scope id to assign to the application. Throws error if any given resource scope is not found.

  • organizationResourceScopes array[string]

    A list of organization resource scope id to assign to the application. Throws error if any given resource scope is not found.

  • userScopes array[string]

    A list of user scope enum value to assign to the application.

    Values are profile, email, phone, address, custom_data, identities, roles, urn:logto:scope:organizations, urn:logto:scope:organization_roles, or urn:logto:scope:sessions.

Responses

  • 201 application/json

    All the user consent scopes are assigned to the application successfully

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    The application is not found

  • 422

    Any of the given organization scope, resource scope or user scope is not found

POST /api/applications/{applicationId}/user-consent-scopes
curl \
 --request POST 'https://[tenant_id].logto.app/api/applications/{applicationId}/user-consent-scopes' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"organizationScopes":["string"],"resourceScopes":["string"],"organizationResourceScopes":["string"],"userScopes":["profile"]}'
Request examples
{
  "organizationScopes": [
    "string"
  ],
  "resourceScopes": [
    "string"
  ],
  "organizationResourceScopes": [
    "string"
  ],
  "userScopes": [
    "profile"
  ]
}