API Key Deactivated
This error is returned when using an API key that has been automatically deactivated because it was detected by GitHub's secret scanner.
GitHub scans public repositories for accidentally committed secrets. When your API key is found in a public repository, we are notified and immediately revoke the key to protect your account from unauthorized access.
What to do next
-
Remove the exposed key from your repository. Simply deleting the key from your code is not enough—it will still exist in your Git history. Consider using a tool like BFG Repo-Cleaner or git filter-repo to remove it from your commit history.
-
Create a new API key in the developer portal. For instructions, please refer to the API Keys page.
-
Use environment variables to store your API key instead of hardcoding it in your source code. This prevents accidental exposure in the future.
Preventing future exposure
- Never commit API keys directly in your code
- Add
.envfiles to your.gitignore - Use secret management tools or environment variables
- Consider using git-secrets to prevent committing secrets