I have to send a bunch of events with a Batch Request to Google Calendar API, can anyone explain to me how to do it in PHP Laravel? I want to Update, Insert, and Delete calendar events with batch.
Actually, I am facing this "Rate Limit Exceeded" error while using the Google Calendar API. If I use Batch call then this error will minimize
local.ERROR: {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "rateLimitExceeded",
"message": "Rate Limit Exceeded"
}
],
"code": 403,
"message": "Rate Limit Exceeded"
}
}
I checked this documentation but it doesn't help me https://developers.google.com/calendar/api/guides/batch
Also, checked some StackOverflow and followed its solution but it's can not help me. I tried code similar to this but it's won't work
$client->setUseBatch(true);
$batch = $service->createBatch();
$query = 'Henry David Thoreau';
$optParams = array('filter' => 'free-ebooks');
$req1 = $service->volumes->listVolumes($query, $optParams);
$batch->add($req1, "thoreau");
$query = 'George Bernard Shaw';
$req2 = $service->volumes->listVolumes($query, $optParams);
$batch->add($req2, "shaw");
$results = $batch->execute();