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.

bash
alpacon token create [flags]

Options

bash
      --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:

bash
alpacon token create

Create a token with a name and expiration:

bash
alpacon token create -n my-token --expiration-in-days 30

Create a token without limits:

bash
alpacon token create -n my-token -l=false

Create a token with specific scopes:

bash
alpacon token create --name ci-token --scopes "server:read,command:create"
Last updated: