Service accounts & management tokens
A service account is a non-human identity — an agent, CI job, or trusted server
integration — that manages your PokerWorks console resources without a person signing in. It
authenticates with a management token (pw_mgmt_…), not a product API key.
How it works
Service accounts are owned by the organization, never by a user. Each one holds a granular set of scopes and zero or more management tokens. You create the service account and its tokens in the console, then hand the token to your automation.
- Management tokens manage the console. They create projects, mint or revoke product API keys, read usage, and so on.
- They never call the calculation API. Equity, ICM, and the other calculations require a
product key (
pw_test_/pw_live_). Apw_mgmt_token is rejected there by design.
Scopes
Service accounts use least-privilege scopes. The launch set:
| Scope | Grants |
|---|---|
org:read | Read the organization/account, balances, settings, and visible projects/keys when paired with their read scopes. |
projects:read | List projects visible to the token. |
projects:create | Create projects. Tokens restricted to specific projects cannot create new projects. |
projects:update | Update visible project settings, including name and allowed origins. |
api_keys:read | List product API keys visible to the token. Secrets are never returned. |
api_keys:create | Create reveal-once product API keys for allowed projects and environments. |
api_keys:revoke | Revoke visible product API keys. |
usage:read | Read usage summaries and recent requests for allowed projects/environments. |
billing:read | Read wallet, balance, credit-pack, receipt, and auto-recharge summary state. Tokens with project restrictions cannot read account billing. |
audit_log:read | Read audit events. Tokens with project or environment restrictions cannot read account-level audit events. |
Tokens can also be restricted to specific project IDs and environments (test, live). An empty
project or environment restriction means account-wide access for that dimension, subject to scopes.
Creating a token
Tokens are shown once at creation and hashed at rest — store them in a secret manager immediately. Tokens are always minted server-side; they are never generated in the browser.
Console users create them under Service accounts:
- Create a service account with
nameand optionaldescription. - Create a token under that service account with
label,scopes, optionalprojectIds, optionalenvironments, and optionalexpiresAt. - Store the returned
secretimmediately.
The token response returns:
Code
The public secret appears only in this creation response. Later reads return metadata such as
masked, prefix, status, scopes, restrictions, and timestamps, never the secret.
Rules & gotchas
- A management token can't mint more management tokens (no privilege escalation).
- Revoking a service account revokes all of its tokens immediately; revoke individual tokens to rotate without downtime.
- Money-moving and account-admin actions are not available to service accounts.