Intermittent 403 errors

Over the past ~week, my app has started intermittently getting this error:

{
“error”: {
“code”: 403,
“message”: “Method doesn’t allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.”,
“status”: “PERMISSION_DENIED”
}
}

I’m not sure what’s happening because

  1. I haven’t shipped any code changes
  2. Sometimes the exact same call will work on a retry

It’s happening just frequently enough to make my app unstable. I’d prefer to keep using Gemini here but can’t be guessing if API calls are going to work.

Hi @jdilla. Welcome to the forum!

Can you provide some more info like whether you are using a paid version or free one, which model you are using and which Gemini python SDK version you are using.

Since it’s an intermittent issue, please try running your code again after sometime.