We upgraded Phoenix from version 12.35.0 to 13.0.3, and after the upgrade, the existing API keys stopped working. The keys were not expired, but we started seeing the following error: __init__.py:193 - Failed to export span batch code: 401, reason: Invalid token When we generated a new API key, everything started working again.
When upgrading Phoenix, if the PHOENIX_SECRET environment variable changes (is regenerated or overwritten), all existing API keys become invalid, even if they still appear in the UI. Generating new API keys resolves the issue because they are signed with the new secret. To prevent this in future upgrades, ensure that PHOENIX_SECRET is persisted and not changed between deployments鈥攎anage it with a persistent Kubernetes Secret or external secrets manager if using Helm or similar tools. This behavior is expected and documented in user reports and official guidance.This issue is not related to API key expiration or database migrations, but specifically to the secret used for signing and validating API keys. Changing the secret invalidates all previously issued keys, requiring regeneration of new ones for continued access. For more, see the linked discussions and documentation below.Would you like more detail on how to persist PHOENIX_SECRET or manage secrets during upgrades?Sources: - GitHub Issue: API Keys invalid after updating - GitHub Issue: Upgrade from 11.3 to 11.29 broke api key
馃挕聽Hint: Mention RunLLM in the thread for followups.
