# Flask chatbot receives 403 when calling Gemini API despite valid key

**URL:** <https://discuss.ai.google.dev/t/flask-chatbot-receives-403-when-calling-gemini-api-despite-valid-key/188406>\
**Category:** Gemini API\
**Tags:** bug\
**Created:** [October 12, 2026, 4:13am UTC](https://discuss.ai.google.dev/t/flask-chatbot-receives-403-when-calling-gemini-api-despite-valid-key/188406 "2026-10-12T04:13:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritik\_Verma](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/ritik_verma/32/156233_2.png) [@Ritik\_Verma](https://discuss.ai.google.dev/u/Ritik_Verma)\
**Post date:** [October 12, 2026, 4:13am UTC](https://discuss.ai.google.dev/t/flask-chatbot-receives-403-when-calling-gemini-api-despite-valid-key/188406/1 "2026-10-12T04:13:12Z")

</div>

Hello,

I’m building a Python Flask chatbot using the Gemini API. My API key is loaded correctly from my `.env` file, but every request returns this error:

`403 PERMISSION_DENIED — Your project has been denied access. Please contact support.`

I have enabled two-step verification and can now access Google Cloud Console, but the Gemini API error persists.

Could someone help me understand why access to my project has been denied and how I can resolve it?

Thank you.

---

<div class="post-metadata">

**Author:** ![Payal\_Sharma2](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/payal_sharma2/32/31911_2.png) [@Payal\_Sharma2](https://discuss.ai.google.dev/u/Payal_Sharma2)\
**Post date:** [October 13, 2026, 8:13am UTC](https://discuss.ai.google.dev/t/flask-chatbot-receives-403-when-calling-gemini-api-despite-valid-key/188406/2 "2026-10-13T08:13:33Z")

</div>

Hello @Ritik_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. If you’re on the free tier with no billing attached, please try the below steps:

2. Check Model Availability & Rate Limits:

3. Ensure you have completed age verification by navigating to [Google Account Age Verification](https://myaccount.google.com/age-verification) and verifying date of birth in [Google Account Personal Info](https://myaccount.google.com/personal-info).

4. Once age verification is configured, retry your request or create a new API key in[Google AI Studio](https://aistudio.google.com/).

5. If completing these steps still does not restore access (or if using a model requiring a paid tier), you might want to consider adding prepayment credits directly in[Google AI Studio](https://aistudio.google.com/) and/ or attaching a Google Cloud Billing account in the[Google Cloud Console](https://console.cloud.google.com/billing). Please note this will mean you lose your free tier quota.

6. If you are on a paid tier:
