Skip to Content
RcmadeDocs
Ray SecretsReferenceCLI ReferenceAuthentication

ray whoami

Show your current authentication status and user information

Show your current authentication status and user information

Synopsis

ray whoami [options]

Flags & Options

Flag / OptionTypeDescription
--verifybooleanTest and validate authentication token against the remote API server before saving
--jsonbooleanFormat command output as structured JSON for scripting, automation, and piping

Common Examples

1. Inspect current user identity and workspace

Displays the authenticated email address, account ID, and active organization workspace.

ray whoami

2. Verify session validity with live server ping

Pings the Ray Secrets authentication server to verify token health, expiry, and network reachability.

ray whoami --verify

3. Output identity metadata as JSON for CI/CD

Emits authenticated user and workspace metadata as structured JSON for automation audit logs.

ray whoami

Exit Codes

CodeMeaningRecommended Action
0Success. The command completed with no errors.None required.
1Runtime or execution failure. A child process returned non-zero status or a general error occurred.Inspect process output or run with --verbose.
2Authentication failed. Token is missing, expired, or invalid.Run `ray login` or update `RAY_TOKEN`.
3Configuration or binding error. Project or environment context was not found.Run `ray init` or specify `--project` and `--env`.
4Network or API failure. Failed to reach the Ray Secrets vault.Check internet connection or run `ray doctor`.

Ready to eliminate plaintext secrets?

Create a workspace to organize environments, invite your team, and generate scoped Service Tokens for CI/CD.