2014-11-11 3 views
0

meteor.js에서 Google 캘린더 API에 간단한 POST 호출을 구현하려고하는데 막혔습니다. 내 요구는 다음과 같습니다Google 캘린더 REST API 오류

var id = Meteor.http.post("https://www.googleapis.com/calendar/v3/calendars/", { 
    'headers' : { 
     'Authorization': auth, // auth = "Bearer " + Meteor.user().services.google.accessToken 
     'Content-Type': 'application/json' 
    }, 
    'parameters': {}, 
    'body' : { 
     'title': "Calendar Title", 
    } 
    }); 

나는 다음과 같은 오류 얻을 :

Error: failed [400] { 
    "error": { 
     "errors": [{ 
      "domain": "global", 
      "reason": "required", 
      "message": "Missing title." 
     }], 
    "code": 400, 
    "message": "Missing title." 
    } 
} 

어떤 아이디어?

답변

0

해결했습니다. 이것은 바보입니다.

매개 변수를 제거하고 대신 "본문" "데이터"를 만들어 작동합니다.

+0

안녕하세요, 여기에 내 질문에 대한 제안 사항이 있습니까? : http://stackoverflow.com/questions/32144042/making-google-calendar-api-calls-from-google-apps-script-using-oauth2 -와 - 도메인 감사합니다. – mike