2
votes

I am using Google Calendar Api in my php project, and I every day get "Calendar usage limits exceeded" message when I doing insert query, but delete and list methods work fine․ It is my insert function. who can help me?

function insertEvent($start, $end, $cId, $namePhoneClient,$myEmail,$trainerMail){

$client = getClient();
$service = new Google_Service_Calendar($client);
$event = new Google_Service_Calendar_Event(array(
    'summary' => $namePhoneClient,
    'start' => array(
      'dateTime' => $start,
      'timeZone' => 'Europe/Moscow',
    ),
    'end' => array(
      'dateTime' => $end,
      'timeZone' => 'Europe/Moscow',
    ),
    'recurrence' => array(
      'RRULE:FREQ=DAILY;COUNT=1'
    ),
    'attendees' => array(
      array('email' => $myEmail),
      array('email' => $trainerMail),
    ),
));

$calendarId = $cId;
$event_inserted = $service->events->insert($calendarId, $event);

return $event_inserted; 
}
1
please post the exact message - DaImTo
How many inserts do you run in one day? I think somewhere google publishes the usage limits, so you can check if your normal execution would exceed it. - ADyson
[{"domain":"usageLimits","reason":"quotaExceeded","message":"Calendar usage limits exceeded."}] - Ashot Markosyan
today I do 2500 query - Ashot Markosyan
Good question. I want to become a friend with you and have something to discuss with you. My personal email is [email protected], could you let me know your contact info? - Zang wei

1 Answers

1
votes

You can see the API usage limits here and here.

They are as follows:

  • 1,000,000 total queries per day
  • 100,000 created events in a short period of time
  • 60 calendars created in a short period of time
  • 10,000 invites to external guests in a short period of time
  • 2,000 emails sent through 'Email guests' feature in a short period of time
  • 750 calendar shares in a short period of time

I suggest that you insert fewer events.