Skip to main content

Authentication

All requests to ListenX require an API key issued by TagX.

Sending your key

Pass the key in the X-API-Key header:

curl "$LISTENX_BASE/v1/account/me" -H "X-API-Key: lx_live_xxxxxxxx"

A Bearer token is also accepted:

curl "$LISTENX_BASE/v1/account/me" -H "Authorization: Bearer lx_live_xxxxxxxx"

Key format

Keys look like lx_live_ followed by a random secret. Only a short, non-secret prefix (e.g. lx_live_a1b2) is stored in plaintext — the full secret is shown once at creation and stored only as a hash. If you lose it, revoke it and create a new one.

Errors

StatuscodeMeaning
401missing_api_keyNo key provided
401invalid_api_keyKey not found, revoked, or malformed
403account_inactiveThe account is disabled
{ "error": { "code": "invalid_api_key", "message": "Invalid or revoked API key." } }

Security tips

  • Keep keys server-side; never ship them in web/mobile clients.
  • Use a separate key per environment (label them, e.g. prod, staging).
  • Rotate keys periodically; revoke immediately if leaked.