spark whoami
Display the current authenticated user and account information.
Synopsis
spark whoamiDescription
spark whoami shows who you are currently authenticated as. It displays your account email, user ID, and authentication method. This is a quick way to verify your login status without running the full spark status command.
If you are not authenticated, the command tells you so and suggests running spark login. This makes it useful as a sanity check before running queries or shares.
The command contacts the Spark API to validate your current credentials, so it also serves as a connectivity test.
Arguments
This command has no arguments.
Flags
This command has no additional flags beyond global flags.
Examples
Check current user
spark whoamiOutput when authenticated:
Logged in as: you@example.com
User ID: usr_abc123
Auth method: oauthCheck when not logged in
spark whoamiOutput when not authenticated:
Not authenticated. Run 'spark login' to connect.Use in scripts
# Ensure authenticated before running a batch of commands
spark whoami > /dev/null 2>&1 || spark loginRelated commands
spark login— Authenticate with the Spark networkspark logout— Remove credentialsspark status— Full CLI status including version and config- Global Flags — Flags available on all commands