Find Jobs
Hire Freelancers

Immediate help on Google Calendat API BULK operations

€25-50 EUR

Cancelled
Posted about 7 years ago

€25-50 EUR

Paid on delivery
I NEED IMMEDIATE HELP TO HAVE A PHO SCRIPT CORRECTLY RUNNING I'm using the PHP library to publish and delete events to a Google calendar via Google API. Everything it is ok when I add or delete a single event. My problem is if I try to use BATCH operations since I have to add/remove a lot of events. In case of batch operation, I get response (401) Login Required, but the $client it is the same that is perfectly working with single operations. This creates the client and service $client2 = new Google_Client(); $client2->setClientId($client_id); $client2->setClientSecret($client_secret); $client2->setRedirectUri($redirect_uri); $client2->setDeveloperKey($oauth2['authToken']); $service2 = new Google_Service_Calendar($client2) This for adding single event: $created = $service->events->import($oauth2['gcalid'], $gevent, $optParams = array()); This for deleting single event: $service->events->delete($oauth2['gcalid'], $item->getId()); This is the code for BULK operations that are not working. $client2->setUseBatch(true); $batch2 = new Google_Http_Batch($client2); foreach ($items as $item){ echo "Elimino evento " . $item->getId() . "\n"; $req1 = $service2->events->delete($oauth2['gcalid'], $item->getId()); $batch2->add($req1); } $results2 = $batch2->execute(); $client->setUseBatch(false); How could I solve? Thank you, Michele
Project ID: 13231843

About the project

2 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average €117 EUR for this job
User Avatar
A proposal has not yet been provided
€41 EUR in 10 days
5.0 (14 reviews)
1.6
1.6
User Avatar
I can help now I'm new here but expert I have four year experience
€34 EUR in 0 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of ITALY
Sansepolcro, Italy
5.0
49
Payment method verified
Member since May 25, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.