Title: Gemini Auth Key (AQ.) returns 401 ACCESS_TOKEN_TYPE_UNSUPPORTED
Description:
I created a Gemini API authorization key (AQ. prefix) in Google AI Studio. The key is bound to a Google Cloud service account that was automatically generated during key creation.
Verified:
-
Generative Language API is enabled.
-
The service account is enabled.
-
The key is bound to the service account.
-
My Google account has Organization Administrator and Owner roles.
When calling generativelanguage.googleapis.com using the x-goog-api-key header, the API returns:
-
HTTP 401
-
UNAUTHENTICATED -
ACCESS_TOKEN_TYPE_UNSUPPORTED
Could you clarify the correct authentication method for this type of authorization key, and whether this error indicates a backend issue or a configuration problem?