Gemini new API key (AQ__) no longer works in Python
Gemini new API key (AQ__) no longer works in Python
Used to be able to run google-genai SDK inside Python via a Gemini API key.
A month ago, the API stops working. Python starts throwing error "ACCESS_TOKEN_TYPE_UNSUPPORTED".
Gemini said they no longer generate the old unrestricted key that starts with AIz. But the new key (starting with AQ) is not recognised when called from Python.
I have tried the following:
* updated the latest Google Gen AI SDK in Python
pip uninstall google-generativeai
pip install -U google-genai
* hardcoded the API into the environment via Powershell
I have seen some people posting similar issues in Google forums, but as usual, those forum 'experts' are useless.
Anyone actually managed to solve this problem?