Assign user consent scopes to application.

POST /api/applications/{applicationId}/user-consent-scopes

Assign the user consent scopes to an application by application id

Path parameters

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.

  • 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, or urn:logto:scope:organization_roles.

Responses

  • 201

    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 \
 -X POST https://[tenant_id].logto.app/api/applications/{applicationId}/user-consent-scopes \
 -H "Content-Type: application/json" \
 -d '{"organizationScopes":["string"],"resourceScopes":["string"],"userScopes":["profile"]}'
Request example
{
  "organizationScopes": [
    "string"
  ],
  "resourceScopes": [
    "string"
  ],
  "userScopes": [
    "profile"
  ]
}