barryhennessy / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

unable to insert or update events. #334

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, 

I am trying to insert an event to google calendar. I am accessing the calendar 
using a refresh token.

every time I call insert function to insert a new event I got the following 
error:

 Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling POST https://www.googleapis.com/calendar/v3/calendars/primary/events: (400) Bad Request' in C:\xampp\htdocs\my_projects\google_calendar\google-api-php-client\src\io\Google_REST.php:66 Stack trace: #0 C:\xampp\htdocs\my_projects\google_calendar\google-api-php-client\src\io\Google_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 C:\xampp\htdocs\my_projects\google_calendar\google-api-php-client\src\service\Google_ServiceResource.php(186): Google_REST::execute(Object(Google_HttpRequest)) #2 C:\xampp\htdocs\my_projects\google_calendar\google-api-php-client\src\contrib\Google_CalendarService.php(474): Google_ServiceResource->__call('insert', Array) #3 C:\xampp\htdocs\my_projects\google_calendar\GoogleCalendarEventClass.php(57): Google_EventsServiceResource->insert('primary', Object(Google_Event)) #4 C:\xampp\htdocs\my_projects\google_calendar\test.php(12): GoogleCalendarEvent->importEventsToGoogleCalendar(Object(PDO in C:\xampp\htdocs\my_projects\google_calendar\google-api-php-client\src\io\Google_REST.php on line 66

I can retrieve information from the calendar, but I can't insert or update 
always get this error.

if anyone can help, it would be great.

Thanks in advance.

Regards,
Moustafa

Original issue reported on code.google.com by moustafa...@gmail.com on 14 Jun 2013 at 9:04

GoogleCodeExporter commented 8 years ago
This issue tracker is now closing. Development on the Google PHP client library 
moved to GitHub with the release of the 1.0.0-alpha, and now the 1.0 branch has 
reached beta status there will be no further releases of the 0.6 branch of the 
library. 

Please take a look at the latest version on 
https://github.com/google/google-api-php-client

For information on migrating, please take a look at this guide: 
https://developers.google.com/api-client-library/php/guide/migration

For general library support please ask a question on StackOverflow: 
http://stackoverflow.com/questions/tagged/google-api-php-client

If you are looking for support with a specific API, please contact the team 
working with that API via StackOverflow or their preferred support mechanism. 

If your issue still exists with the new version of the library, please raise a 
bug in the GitHub issue tracker with a minimal code sample. 

Thanks!

Original comment by ianbar...@google.com on 22 Jan 2014 at 4:53