'People API - QUOTA_EXCEEDED / FBS quota limit exceeded

The google people api page says correctly how to authenticate and list 10 example contacts and everything works perfectly:

https://developers.google.com/people/quickstart/python

I can authenticate and list 10 perfectly but I'm having an error when trying to create new contacts.

The api is returning me the following error:

HttpError: <HttpError 429 when requesting https://people.googleapis.com/v1/people:createContact?alt=json returned "Resource has been exhausted (e.g. check quota).". Details: "[{'@type': 'type.googleapis.com/google.rpc.QuotaFailure', 'violations': [{'subject': 'QUOTA_EXCEEDED', 'description': 'FBS quota limit exceeded.'}]}]">

when i click on https://people.googleapis.com/v1/people:createContact?alt=json, i have the following json on page:

{
  "error": {
    "code": 403,
    "message": "The request is missing a valid API key.",
    "status": "PERMISSION_DENIED"
  }
}

I changed the scopes perfectly, even creating contacts a few months ago. Out of nowhere everything stopped working and I'm having trouble QUOTA_EXCEEDED and FBS quota limit exceeded

I redid the entire authentication process and even tried to list contacts and without problems, everything works perfectly LESS the creation of contacts

Some observations:

  1. I use via jupyter notebook and I'm also logged in to the email where I want to create the contacts
  2. I've tried to run in an IDE and the same problem
  3. I've created 26888 contacts this way
  4. This project does not appear on the Google console because I think I did the entire project through documentation page, and I believe that the quotas have not been exhausted, just because I can see the values ​​correctly. I create on average 1 contact every 3 seconds and 200 contacts per day (maximum)

I would like a lot of help to know why I can't create more contacts, I have a lot of work pending because of that, thanks.

my code to create contacts:

def main():

    creds = None
    # The file token.pickle stores the user's access and refresh tokens, and is
    # created automatically when the authorization flow completes for the first
    # time.
    if os.path.exists('token.pickle'):
        with open('token.pickle', 'rb') as token:
            creds = pickle.load(token)
    # If there are no (valid) credentials available, let the user log in.
    if not creds or not creds.valid:
        if creds and creds.expired and creds.refresh_token:
            creds.refresh(Request())
        else:
            flow = InstalledAppFlow.from_client_secrets_file(
                'credentials.json', SCOPES)
            creds = flow.run_local_server(port=0)
        # Save the credentials for the next run
        with open('token.pickle', 'wb') as token:
            pickle.dump(creds, token)

    service = build('people', 'v1', credentials=creds)


#----------------creatingc contacts----------------------

    print('trying')
    for i in df_banco_linhas[:2]:

        if i[1] not in df_csv_linhas:
            time.sleep(3)

            service.people().createContact( body={
                "names": [
                    {
                        "givenName": i[0]
                    }
                ],
                "phoneNumbers": [
                    {
                        'value': i[1]
                    }
                ]
            }).execute()
            print('create: ' + i[0])
            time.sleep(3)

        else:
            print('NO')

if __name__ == '__main__':
    main()


Solution 1:[1]

As the problem was only happening when creating contacts, I decided to investigate the limit on the number of contacts and I came across the limit of 25000 in the documentation.

I was forced to create another email to solve the problem and increase my capacity to 50000 contacts (synchronizing two emails).

Their error message denotes that the problem is in the quota limit (requests), when in fact it is limit of contacts by email.

Solution 2:[2]

I was getting this same quota limit exceeded error ("FBS quota limit exceeded.") for a different reason. I was supplying values too long for the Organization.jobDescription field.

Perhaps this specific quota limit triggers when some non-rate constraints are violated, like total number of emails or maximum length of fields.

This may not be intended, since that kind of violation doesn't fit the 429 status code, and that limit is not listed in the Quotas section of the API/Service Details page for the People API in the console.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Leonardo Henriques
Solution 2 Dylan Moring