Hello, I am experiencing a critical and persistent failure when trying to call the Generative Language API from a Google Apps Script environment.
The API server consistently returns an empty response body (`Failed Response Text: `) which masks an underlying block (likely a 400 or 403 error due to provisioning failure). This is not a code issue, as I have performed extensive troubleshooting.
### My Account Identifiers (REQUIRED FOR DIAGNOSIS)
To assist with diagnosis, please refer to the following identifiers associated with my attempts:
1. **Google Account Email:** [Paste your **stsbob@gmail.com** address here]
2. **AI Studio Project ID:** `gen-lang-client-0386653834` (The ID listed for the new keys in the AI Studio Dashboard)
3. **Old GCP Project ID:** `220458331800` (The ID for the ‘Default Gemini Project’)
4. **A Current Key Suffix:** [Paste the **last 6 characters** of your AI Studio Key here. Example: If key is `AIzaSy…XYZ123`, paste `XYZ123`]
***
###
Summary of Troubleshooting Steps Taken (All Failed)
I have performed the following exhaustive steps on two separate projects, indicating this is a server-side provisioning problem on the Google AI Platform:
* **Billing:** Confirmed an active billing account is linked.
* **API Enablement:** Confirmed the **Generative Language API** is enabled. *
**Authorization:** The Apps Script is fully authorized with required permissions. *
**Tested Two Key Sources:** Confirmed same failure using keys from both **Google Cloud Console** and the **Google AI Studio** generator. *
**Models Tested:** Confirmed failure with multiple models, including `gemini-2.5-pro`, `gemini-2.5-flash`, and `gemini-2.5-flash-001`. *
**Error Source:** The error is consistently produced by the `UrlFetchApp.fetch` call returning an empty body, indicating a block on API activation.
Could a specialist please investigate the provisioning status of my account/project to resolve this fundamental connection block?
I have been guided by my AI assistant, Gemini, through every known configuration fix across two separate projects. Given that all client-side settings are confirmed correct, we were forced to conclude that the only path forward is a direct, server-side review by your team.
Thank you.