ktm whoami

Check which identity the ktm CLI authenticates as using ktm whoami, revealing API key or stored OAuth token details.

Show the identity the CLI authenticates as (API key or stored OAuth token)

Usage

ktm whoami [flags]

Examples

# Show the identity behind the effective credentials
ktm whoami

# Machine-readable envelope for scripts
ktm whoami -o json

Flags

FlagTypeDefaultDescription
--creds-filestringPath to the fallback credentials file
--no-keychainbooleanOperate on the file fallback instead of the OS keychain

Details

Display the identity behind the CLI's effective credentials, mirroring the same resolution order every other command uses:

  1. API key (--api-key-file, then KAPPTIVATE_API_KEY) — exchanged against the platform for a JWT; identity claims are decoded from it (one network call).
  2. Stored OAuth token from 'ktm login' — local-only read, no network.

Exit code 0 means the CLI has working credentials; 2 means it does not (no credentials, expired token, or a rejected API key). Claims are shown as unverified display values decoded from the JWT payload.

Global flags (--output, --debug, --host, …) apply to every command. See the command reference overview.

What's next?

All commands

Browse the full CLI reference.

Get started

Install the CLI and authenticate.

Last updated on