osmo token set#

Create a personal access token for yourself or another user (admin only).

usage: osmo token set [-h] [--expires-at EXPIRES_AT]
                      [--description DESCRIPTION] [--user USER]
                      [--roles ROLES] [--format-type {json,text}]
                      name

Positional Arguments#

name#

Name of the token.

Named Arguments#

--expires-at, -e#

Expiration date of the token (UTC). Format: YYYY-MM-DD. Default: 31 days from now.

Default: 2026-04-10

--description, -d#

Description of the token.

--user, -u#

Create token for a specific user (admin only). By default, creates token for the current user.

--roles, -r#

Role to assign to the token. Can be specified multiple times. If not specified, inherits all of the user’s current roles.

--format-type, -t#

Possible choices: json, text

Specify the output format type (Default text).

Default: 'text'

Ex. osmo token set my-token –expires-at 2026-05-01 Ex. osmo token set my-token -e 2026-05-01 -d “My token description” Ex. osmo token set my-token -r role1 -r role2 Ex. osmo token set service-token –user service-account@example.com –roles osmo-backend