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 [ROLES ...]]
[--format-type {json,text}]
name
Positional Arguments#
nameName of the token.
Named Arguments#
--expires-at, -eExpiration date of the token (UTC). Format: YYYY-MM-DD. Default: 31 days from now.
Default:
2026-07-26--description, -dDescription of the token.
--user, -uCreate token for a specific user (admin only). By default, creates token for the current user.
--roles, -rRole to assign to the token. Can be specified multiple times. If not specified, inherits all of the user’s current roles.
--format-type, -tPossible 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