alpacon token create
Generates a new API token for accessing the server. This command allows you to create a token by specifying options such as token name, expiration, and scopes.
alpacon token create [flags]Options
--expiration-in-days int Days until the token expires (0 = the workspace's maximum token lifetime)
-h, --help help for create
-l, --limit Set to true to apply usage limits (default true)
-n, --name string A name to remember the token easily
--scopes string Comma-separated list of scopes (e.g. "server:read,command:create"). Omit to get every scope you can grant: "*" for a superuser, your roles' scopes otherwise.Omitting --scopes grants every scope you may grant: all scopes (*) for a workspace superuser, and the scopes of your roles for anyone else. --expiration-in-days 0 sets the token’s lifetime to the workspace’s maximum token lifetime. Run alpacon token scopes to see what you can grant, and see the scopes reference for what each one permits.
Examples
Create a token interactively:
alpacon token createCreate a token with a name and expiration:
alpacon token create -n my-token --expiration-in-days 30Create a token without limits:
alpacon token create -n my-token -l=falseCreate a token with specific scopes:
alpacon token create --name ci-token --scopes "server:read,command:create"