Skip to main content

signaloid-cli auth whoami

Display information about the currently authenticated user.

Synopsis​

signaloid-cli auth whoami [options]

Options​

OptionDescription
--format <type>Output format: table or json (default: json)

Description​

The whoami command retrieves and displays information about the currently authenticated user from the Signaloid API. This is useful for:

  • Verifying your authentication is valid
  • Checking which account you are logged in with
  • Extracting user information for scripts
  • Troubleshooting authentication issues

Examples​

Basic Usage​

signaloid-cli auth whoami

Extract Specific Fields with jq​

Get user name:

signaloid-cli auth whoami | jq -r '.Username'

Example output:

john.doe@example.com

Get user ID:

signaloid-cli auth whoami | jq -r '.UserID'

Example output:

usr_12345661ad6641899387b6458cc9a2e2

Verify Authentication in Scripts​

#!/bin/bash

if signaloid-cli auth whoami > /dev/null 2>&1; then
echo "✓ Authenticated"
USER_EMAIL=$(signaloid-cli auth whoami | jq -r '.Username')
echo "Logged in as: $USER_EMAIL"
else
echo "✗ Not authenticated"
exit 1
fi

Exit Codes​

CodeDescription
0Successfully retrieved user information
1Not logged in (no stored credentials), or the request failed
3The API rejected the stored credentials, for example an expired or deleted API key

See Also​

Learn More​