Hello Google Gemini API team,
I am investigating an authentication failure during a small, controlled API compatibility test.
Environment
-
Platform: Windows 11, Python 3.14
-
Google Cloud project: Default Gemini Project (Free Tier)
-
API key: Created in Google AI Studio on October 16, 2026
-
Key type: Service-account-bound authorization key
-
API restriction: Gemini API
-
Application restriction: None
-
Gemini API: Enabled
-
Endpoint:
POST /v1beta/interactions -
Model:
gemini-3.8-flash -
Authentication:
x-goog-api-keyheader
Observed result — October 17, 2026
The HTTPS request returned HTTP 401.
Our local audit recorded:
-
Transport completed: true
-
HTTP status: 401
-
Error class: authentication
-
No confirmed model generation or usage
For security reasons, our application intentionally discarded the raw error body. Therefore, I cannot confirm whether the underlying Google error reason was ACCESS_TOKEN_TYPE_UNSUPPORTED.
I have confirmed that the key exists in the correct Google Cloud project, is bound to a service account, and is restricted to the Gemini API.
Could you please clarify:
-
Are there any additional requirements for service-account-bound authorization keys when calling the Gemini Interactions API?
-
Could HTTP 401 indicate a key provisioning or service-account binding problem even when these settings appear correct?
-
Is there a recommended diagnostic method to identify the specific authentication error without exposing the API key?
I have preserved the original failed attempt and have not retried it. I can provide additional sanitized evidence and project identifiers privately if needed.
Thank you.