Auth API reference

Auth API · Consumer-Me

get/{app_slug}/v1/me/permissionsAuth

Resolve the signed-in EndUser's effective permissions

Returns the union of the app-level role permissions and the tenant-level role permissions (when the token carries an `org_id`). Resolved per-request through a 60-second LRU — role-permission edits propagate within ~1 minute. Use this instead of decoding a `permissions[]` claim from the JWT, which is no longer included. M2M tokens cannot call this — use `POST /:appSlug/v1/oauth/introspect` to inspect M2M scopes.

Path parameters

app_slug*string

Slug of the app.

Response · 200

role*string

App-level role name from the EndUser's token. `null` when unset.

Example: "admin"

org_role*string

Tenant-scoped role name from the token when signed into a tenant. `null` otherwise.

Example: "editor"

permissions*array

Sorted union of the app-level role permissions and the tenant-scoped role permissions when applicable.

Example: ["user.read","user.list"]

Example

Request

GET https://api.auth.productcraft.co/{app_slug}/v1/me/permissions
Authorization: Bearer YOUR_TOKEN

Response

{
  "role": "admin",
  "org_role": "editor",
  "permissions": [
    "user.read",
    "user.list"
  ]
}