Skip to main content

oh api-token

Manage API tokens scoped to a service principal.

caution

The token secret is shown only once at creation time. Store it immediately — it cannot be retrieved again.


oh api-token create NAME

Creates an API token for a service principal.

FlagRequiredDescription
--service-principalYesService principal to create the token for
oh api-token create ci-token --service-principal ci-pipeline

oh api-token delete NAME

Deletes an API token.

FlagRequiredDescription
--service-principalYesService principal that owns the token
oh api-token delete ci-token --service-principal ci-pipeline