#!/usr/bin/env python3
"""
Quick API key format test
"""

import base64

# The credentials from the JavaScript
APPLICATION_UUID_B64 = "OGM3NDgxYzUyNjYxYzQ5MzNiNzA3YTE0ZTZjZDIyYmE="
ACCESS_KEY_B64 = "MzZiNzg4NzIyYjg2MGY3ZGM3MWEyZWZhYzgyOTM1YTk="

# Decode them
app_uuid = base64.b64decode(APPLICATION_UUID_B64).decode()
access_key = base64.b64decode(ACCESS_KEY_B64).decode()

print("Decoded values:")
print(f"  Application UUID: {app_uuid}")
print(f"  Access Key: {access_key}")

# The user's capture showed the api_key directly as base64
# Let's check if it's just the application_uuid or a combination
print(f"\nOption 1 - Just application_uuid (base64):")
print(f"  {APPLICATION_UUID_B64}")

print(f"\nOption 2 - Combined uuid:access_key (base64):")
combined = f"{app_uuid}:{access_key}"
combined_b64 = base64.b64encode(combined.encode()).decode()
print(f"  {combined_b64}")

print(f"\nOption 3 - Just application_uuid decoded value:")
print(f"  {app_uuid}")

# Check user's capture - they used this format
print(f"\n\nFrom user's WebSocket capture, the api_key was:")
print(f"  (Need to check the actual capture message)")
