Skip to content

enumeray auth token-create

Create a scoped expiring API token and save its secret privately.

Use when: An automation needs narrower, renewable access than your interactive login.

Role and prerequisites: Authenticated account with tokens:manage, allowed to delegate the selected scopes within its own authority. Install enumeray, configure the API and log in. Use an account or delegated token with the required permissions. Example IDs must be replaced with IDs from your service.

Terminal window
enumeray auth token-create analysis-bot --scopes me:read,models:read,runs:read,runs:create,artifacts:read,artifacts:download --expires-in-seconds 86400 --output analysis-token.json
Input Meaning and use
<NAME> Descriptive delegated-token name shown in token inventory, for example analysis-bot.
--scopes <SCOPES> Required comma-separated delegated scopes, for example me:read,models:read,runs:read,runs:create,artifacts:read,artifacts:download. Choose the smallest set in the permissions reference; a token cannot grant authority its owner lacks.
--expires-in-seconds <EXPIRES_IN_SECONDS> Lifetime of the delegated token in seconds; default 2592000 (30 days). Choose a shorter lifetime for an automation that can be renewed.
--output <OUTPUT> New private JSON file containing the one-time plaintext token response. The path must not already exist; stdout deliberately omits the secret.

Every command also accepts the profile, API, JSON and timeout options.

Creates the token on the service, writes the token response to a new private file, and prints only saved path, ID and expiry.

Store the file securely and configure the automation via stdin or its private environment; inspect with token-list and revoke when unused.

Exact syntax, defaults and accepted values
Create a scoped, expiring token and save the secret to a private file
Usage: enumeray auth token-create [OPTIONS] --scopes <SCOPES> --output <OUTPUT> <NAME>
Arguments:
<NAME> Descriptive delegated-token name shown by auth token-list
Options:
--api <API>
User API origin override; credentials never cross origins. Host/runner commands use explicit configuration
--scopes <SCOPES>
Comma-separated delegated scopes; repeatable. The token cannot exceed your own authority
--expires-in-seconds <EXPIRES_IN_SECONDS>
Delegated-token lifetime in seconds; default is 30 days [default: 2592000]
--profile <PROFILE>
Named local user API/login profile; host/runner commands use explicit configuration [default: default]
--config <CONFIG>
Private user profiles file; defaults to $XDG_CONFIG_HOME/enumeray/profiles.json or ~/.config/enumeray/profiles.json
--output <OUTPUT>
New private JSON file for the one-time token response; existing paths are refused
--json
Emit user API results as JSON (NDJSON for following logs) and runtime errors on stderr; host/runner output follows its own protocol
--timeout <TIMEOUT>
User API HTTP timeout in seconds; live logs use it for read inactivity. Does not limit execution time [default: 60]
-h, --help
Print help

Documentation 205dcb3116ea · public sources 8c70356d340f · built .Download documentation identity.