I've created project and registered it using https://code.google.com/apis/console (I've choosen "other" application type). Then I got "Client ID" for installed applications.
Then I went to console and created event, and authorised using oauth 2. https://developers.google.com/google-apps/calendar/v3/reference/events/insert Everything worked fine.
POST https://www.googleapis.com/calendar/v3/calendars/primary/events?key={YOUR_API_KEY}
Content-Type: application/json
Authorization: xxx
X-JavaScript-User-Agent: Google APIs Explorer
{
"end": {
"dateTime": "2013-1-16T10:00:00.000-07:00"
},
"start": {
"dateTime": "2013-1-16T10:00:00.000-07:00"
}
}
Response
200 OK
- Show headers -
{
"kind": "calendar#event",
"etag": "\"WANTVF5ixxZ04U_VtQ0AZ3MbAlM/Z2NhbDAwMDAxMzY1NjU0MzAwNTk1MDAw\"",
"id": "2nsuis19mkp2q0uef54tl5nk68",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=Mm5zdWlzMTlta3AycTB1ZWY1NHRsNW5rNjggaXZhbjEzMzEzM0Bt",
"created": "2013-04-11T04:25:00.000Z",
"updated": "2013-04-11T04:25:00.595Z",
"creator": {
"email": "[email protected]",
"displayName": "ivan rozhcov",
"self": true
},
"organizer": {
"email": "[email protected]",
"self": true
},
"start": {
"dateTime": "2013-01-16T21:00:00+04:00"
},
"end": {
"dateTime": "2013-01-16T21:00:00+04:00"
},
"iCalUID": "[email protected]",
"sequence": 0,
"reminders": {
"useDefault": true
}
}
Then I copied id and updated this event. https://developers.google.com/google-apps/calendar/v3/reference/events/update update First time I got 200 response.
PUT https://www.googleapis.com/calendar/v3/calendars/primary/events/2nsuis19mkp2q0uef54tl5nk68?key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29.AHES6ZRmo6pdxj8pY4NmzdI1estRNB-v87XV7xQHgyhrWHk2rzs3Ke8
X-JavaScript-User-Agent: Google APIs Explorer
{
"end": {
"dateTime": "2013-1-16T10:00:00.000-07:00"
},
"start": {
"dateTime": "2013-1-16T10:00:00.000-07:00"
}
}
But when I tried this again, I always got 400 error, error text is written below.
https://developers.google.com/google-apps/calendar/v3/reference/events/update update
400 Bad Request
cache-control: private, max-age=0
content-encoding: gzip
content-length: 123
content-type: application/json; charset=UTF-8
date: Wed, 10 Apr 2013 12:49:29 GMT
expires: Wed, 10 Apr 2013 12:49:29 GMT
server: GSE
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid Value"
}
],
"code": 400,
"message": "Invalid Value"
}
}
Can anyone explain, if that's google.api bug, or maybe I'm mistaken somwhere?
I've tryed it from differret account and PC (throught Google APIs Explorer and python library with same result)
Today I've tried to reproduce that bug. But everring works fine now. I've created an issue in google code http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3371&thanks=3371&ts=1365599378 Still without answer.
I think it's was temporaru bug.