Herald
OpenapiExt

Check user permissions

This endpoint allows third-party applications to check if a user has specific permissions using their browser access token. # Authentication Requires valid API Key via X-API-Key header # Example ```json { "accessToken": "user-access-token", "rules": [ {"resource": "article", "action": "read"}, {"resource": "article", "action": "write"} ] } ```

POST
/api/ext/permission/check

This endpoint allows third-party applications to check if a user has specific permissions using their browser access token.

Authentication

Requires valid API Key via X-API-Key header

Example

{
  "accessToken": "user-access-token",
  "rules": [
    {"resource": "article", "action": "read"},
    {"resource": "article", "action": "write"}
  ]
}

Authorization

api_key
headerX-API-Key<token>

Client-app API key (third-party external API).

Request Body

application/json
  1. body
clientId*string
rules?array<>|null
token*string

Response Body

Permission check completed

application/json
  1. response
allowed*boolean
userId?|
Formatuuid
Example Request
curl -X POST 'https://example.com/api/ext/permission/check' \
  -H 'Content-Type: application/json' \
  -d '{
  "clientId": "string",
  "token": "string"
}'
Example Response
{
  "allowed": true,
  "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b"
}