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
| Flag | Type | Default | Description |
|---|---|---|---|
--creds-file | string | Path to the fallback credentials file | |
--no-keychain | boolean | Operate 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:
- 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).
- 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?
Last updated on