我正在尝试在Google Calendar API上执行简单的freebusy查询.我的授权一切工作正常,可以查看用户日历列表等.当我尝试提交忙/闲查询时,我得到400错误(据我所知)没有关于它的详细信息不喜欢.
在我自己的代码和使用Google Calendar API"试用"功能时都是如此.
这是我的请求(使用Try It小部件创建)和响应:Request
POST https://www.googleapis.com/calendar/v3/freeBusy?key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29.AHES6ZTr-2wksEvp0iGPTnHTirTIItib5WwxmSAySq1ghfI98Cz88kA
X-JavaScript-User-Agent: Google APIs Explorer
{
"items": [
{
"id": "[my calendar id goes here]@group.calendar.google.com"
}
],
"timeMin": "2012-01-31T09:00:00",
"timeMax": "2012-01-31T10:00:00",
"timeZone": "GMT"
}
Response
400 Bad Request
cache-control: private, max-age=0
content-encoding: gzip
content-length: 122
content-type: application/json; charset=UTF-8
date: Sun, 16 Jun 2013 13:08:32 GMT
expires: Sun, 16 Jun 2013 13:08:32 GMT
server: GSE
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "Bad …Run Code Online (Sandbox Code Playgroud)