ArmorIQ SDK

Invalid API key format

Validate API key structure and length.

Invalid API key format

Cause: API key doesn't match expected format.

Solution:

import os

api_key = os.getenv("ARMORIQ_API_KEY")

# Validate format
assert api_key.startswith("ak_live_"), "API key must start with ak_live_"
assert len(api_key) == 72, f"API key must be 72 chars, got {len(api_key)}"
assert all(c in "0123456789abcdef" for c in api_key[8:]), "API key must be hex"

On this page