Invalid API Key
Invalid API Key
https://docs.username.dev/errors/invalid-api-key401When it occurs
Your API key is missing, malformed, or invalid. This can happen if:
- The
Authorizationheader is missing - The API key format is incorrect
- The API key has been regenerated or expired
- The API key doesn’t exist in the system
How to fix
- Verify your API key is correctly formatted as
un_live_<32-char-random> - Ensure the
Authorizationheader is included:Authorization: Bearer un_live_your_api_key - Get your API key from the dashboard at app.username.dev/dashboard
- If you recently regenerated your API key, make sure you’re using the new key
Authorization header.Related documentation
- Understanding error responses - Learn about RFC 7807 Problem Details format
- Quick start guide - Learn how to authenticate your requests