Skip to main content

signaloid-cli auth whoami

Display information about the currently authenticated user.

Synopsis

signaloid-cli auth whoami

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're 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:

user_abc123

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 '.email')
echo "Logged in as: $USER_EMAIL"
else
echo "✗ Not authenticated"
exit 1
fi

Exit Codes

CodeDescription
0Successfully retrieved user information
1Authentication failed or not authenticated

See Also

Learn More