AbadgeUserClient is the operator client. It calls the management endpoints of the /v1 API on behalf of a signed-in user.
Construction
string
required
API endpoint URL, no trailing slash.
string
required
Operator session token (the same token the CLI receives from the device-code flow and the dashboard holds in its session cookie), or a personal API key (
abu_...). A personal API key authenticates the management surface only and can never reach access.*.string
Active organization ID. Sent as
X-Abadge-Org-Id on every request. Required when the signed-in user belongs to multiple organizations.Organizations
Profiles
Items
Agents
Permissions
permissions.create takes either an item target or a profile target
(grants then apply to every current and future item in the profile). All
capabilities in one call commit atomically.
API keys
Personal API keys (abu_) for the management surface are not exposed through
the SDK. Create, list, and revoke them from the dashboard org Settings page or
the REST endpoints (POST / GET / DELETE /v1/api-keys). A personal API key
authenticates the management surface only — it can never reach access.* — and
cannot create or revoke other API keys (so these calls require a browser-backed
session). Once issued, an abu_ key can be used as the sessionToken for an
AbadgeUserClient.
Audit
Example: bootstrap an org and grant access
Errors
Every error is wrapped inAbadgeApiError. See Error handling.