Skip to main content

AddDeviceCodeClient

Adds a new client using grant type 'device code'.

Examples​

Interactive: asks for the client secret twice, without echoing it:

octo-cli -c AddDeviceCodeClient -id "my-device" -n "My IoT Device"

Automation: pipe the secret in (e.g. from a secret store):

octo-cli -c AddDeviceCodeClient `
-id "my-device" `
-n "My IoT Device" `
-ss

Options​

ShortLongRequiredDescription
-id--clientIdyesServiceClient ID, must be unique
-n--nameyesDisplay name of client used for grants
-s--secretnoDeprecated: client secret used for client credential authentication. A value on the command line ends up in the shell history and the process list.
Omit it to be prompted (hidden input), or use --secret-stdin or the environment variable OCTO_CLI_NEW_CLIENT_SECRET.
-ss--secret-stdinnoRead the client secret from standard input (one value; a trailing line break is removed)

Notes​

The client secret is read from a hidden prompt, from standard input (--secret-stdin) or from the environment variable OCTO_CLI_NEW_CLIENT_SECRET, so it does not end up in the shell history or the process list. -s still works in this release but logs a deprecation warning and will be removed. OCTO_CLI_CLIENT_SECRET is not read here: it is the secret octo-cli itself logs in with.