Gemini API returns 403 "Your project has been denied access" on a new project

Hello,

I am trying to use the Gemini API from Google Apps Script.

I created a new Google AI Studio project named “nazuna-notebook” and created a new API key for that project. The Gemini API is enabled in Google Cloud Console. I also enabled 2-Step Verification on my Google account.

A request to generateContent still returns HTTP 403 with the following message:

“Your project has been denied access. Please contact support.”

The API key can successfully retrieve the model list, but generateContent requests are denied.

I also tested with a newly created project and API key, but received the same 403 error.

Could you please advise why my project is being denied access and how I can restore access to the Gemini API?

Thank you.

Hello @nazuna_farm ,

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:

    • Ensure that the model you are requesting is available on your current plan. For example, not all models are available on the free tier. You can verify model availability, quotas, and limits on the AI Studio Rate Limit dashboard.
  3. Ensure you have completed age verification by navigating to Google Account Age Verification and verifying date of birth in Google Account Personal Info.

  4. Complete Phone Verification and turn on 2-Step Verification (2SV) on the Google Account associated with your project.

  5. Once age, phone and 2sv are configured, retry your request or create a new API key in Google AI Studio.

  6. 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 and/ or attaching a Google Cloud Billing account in the Google Cloud Console. Please note this will mean you lose your free tier quota.

Thank you for your reply.

I have now completed the suggested steps:

Added and verified my date of birth / age information
Completed phone verification
Enabled 2-Step Verification
Confirmed that the Gemini API is enabled for the project
Created a new API key after completing these steps

I then retried the generateContent request with the new API key, but I still receive HTTP 403 with the same message:

“Your project has been denied access. Please contact support.”

Could you please advise what I should do next? Is a manual review or removal of an account/project restriction required?

Thank you.

Hi, I’m experiencing the exact same issue and unfortunately it still hasn’t been resolved on my side.

I’ve completed age verification, phone verification, and enabled 2-Step Verification. I also created a new project and a new Gemini API key, but the project still shows “Restricted” with “Project quota tier: Unavailable”, and API requests return 403 – Your project has been denied access.

Have you managed to find a solution or get your access restored since your last post? If so, could you please let me know what worked for you?

Thanks!

Hello @nazuna_farm , @Abdelrahman_Fathy ,

It seems like your projects are flagged by automated account security checks. To unblock this error, you should consider upgrading to a paid plan. You could add prepayment credits directly in Google AI Studio and/ or by attaching an active billing account in the Google Cloud Console.