"403 PERMISSION_DENIED — 'Your project has been denied access' — requesting review and unlock"

  1. Project ID: gen-lang-client-07457211..

  2. Project Number: 3393557412..

  3. Project Name: projects/3393557412..

  4. Workspace/domain name: aks...apital.com

  5. Account email that created the key: d…com

  6. Exact error message: 3. CROSS-CHECK pass (penultimate step) — Gemini + Google Search

    # ---------------------------------------------------------------------------

    def cross_check_via_gemini(draft_digest):

    """

    Mandatory step. Raises rather than silently skipping — a missing key,

    a failed request, or an empty response are all treated as a run-stopping

    error, since this cross-check is no longer an optional nice-to-have.

    """

    api_key = os.environ.get("GEMINI_API_KEY")

    if not api_key:

    raise RuntimeError(

    "GEMINI_API_KEY is not set. The Gemini/Google Search cross-check is a "

    "mandatory step, not optional. Get a free key at "

    "https://aistudio.google.com/apikey and add it as a GitHub Actions "

    "secret named GEMINI_API_KEY."

    )

    today_str = datetime.now().strftime("%A, %B %d, %Y")

    prompt = f"""Today is {today_str}. You are an independent second reviewer

    performing a cross-check of the draft investment digest below, using Google

    Search. You did not write this draft and should not assume it is correct.

    For each situation named in the draft:

    - Search independently and state whether you can confirm it is still

    active/open today.

    - Flag any discrepancy in dates, offer prices, swap ratios, or the stated

    current market price / 52-week high-low versus what the draft states.

    For the current market price specifically, confirm the LATEST End-of-Day

    closing price from the most recently completed trading session as of

    today — flag it if the draft's figure appears stale or outdated.

    - Note any situation you believe is missing — an open offer, buyback tender,

    or NCLT-approved merger/demerger swap that is currently active in Indian

    listed equities but absent from the draft.

    Be terse. Bullet points only, one line each. This is a working input for

    another reviewer to reconcile, not a finished document.

    --- DRAFT DIGEST ---

    {draft_digest}

    --- END DRAFT DIGEST ---"""

    try:

    resp = requests.post(

    GEMINI_API_URL,

    params={"key": api_key},

    json={

    "contents": [{"parts": [{"text": prompt}]}],

    "tools": [{"google_search": {}}],

    },

    timeout=60,

    )

    resp.raise_for_status()

    except requests.exceptions.RequestException as e:

    # Include the response body (if any) — this is where Google explains

    # *why* (invalid key, restricted, quota, region) rather than just

    # the generic HTTP status.

    body = ""

    if e.response is not None:

    try:

    body = f" | Response body: {e.response.text[:500]}"

    except Exception:

    pass

    raise RuntimeError(f"Gemini cross-check request failed: {e}{body}") from e

    data = resp.json()

    candidates = data.get("candidates", [])

    if not candidates:

    raise RuntimeError("Gemini cross-check returned no candidates — cannot proceed without a valid cross-check result.")

    parts = candidates[0].get("content", {}).get("parts", [])

    text = "\n".join(p.get("text", "") for p in parts if "text" in p).strip()

    if not text:

    raise RuntimeError("Gemini cross-check returned empty text — cannot proceed without a valid cross-check result.")

    return text

  7. When it started: 5 July 2026 and confirmation: there’s no known policy violation or unusual usage

  8. “Requesting a review and unlock of Gemini API access for this project.”

Hello @Deepak_Verma ,

Getting a 403 API error response and / or seeing “Unavailable” next to your project in AI audio indicates a flag has been placed on your account. To proceed:

  1. Check for banners / error callouts in the AI Studio Projects page & the Billing page.

  2. If the issue isn’t clear from the above, contact Cloud Billing Support.