Skip to main content
The CLI needs a credential to reach your organization. It supports three kinds, and uses the first one that is set: If you set an application and an API key at the same time, the application wins. If you set OCCTOO_CLIENT_ID without OCCTOO_CLIENT_SECRET, the CLI stops with an error.
Secrets are never command-line flags, because flags end up in your shell history and in process lists. Pass them as environment variables.

Sign in with your own account

The CLI shows a code and opens your browser. Confirm the code in the browser and you are signed in. The CLI stores the session in your operating system keychain, such as Keychain on macOS or Credential Manager on Windows, and refreshes it when needed. Check who you are signed in as:
whoami shows your user, organization and roles, read from the access token. To sign out and remove the stored session:

Use an application in CI

An application is a client id and secret that a program signs in with. Create one in Studio or with occtoo applications create, and give it access to what the job needs. Set both values as environment variables, for example as secrets in your CI system:
The CLI gets an access token from https://auth.occtoo.com with the client credentials flow. You don’t need to call occtoo auth login.

Use an API key

The CLI sends the key with every request.

Check your credentials

auth status shows which credential the CLI uses and checks it against the API. Run it when a command fails with an authentication error.

Command reference