有人可以告訴我爲什麼我無法使用相同的令牌從Google檢索userInfo和日曆列表嗎?OAuth令牌適用於userInfo,但不適用於Google日曆
我已經設置了正確的範圍(我認爲):
爲了讓我使用這個網址的用戶信息:https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=和日曆使用:https://www.googleapis.com/calendar/v3/users/me/calendarList?minAccessRole=writer&key=。
在用戶信息中,我得到所有正確的信息,但對於我收到的日曆錯誤401:需要登錄。
這裏有什麼問題?
感謝您的答案1月和德建議。 – 2012-07-16 17:32:28
不客氣:) – 2012-07-16 17:41:05
所以我可以進行相同的調用,並在標頭中傳遞令牌(而不是查詢參數)?像這樣的https://www.googleapis.com/calendar/v3/users/me/calendarList?minAccessRole=writer(和標題中的標記)?謝謝 – OhadR 2012-11-09 17:56:35