【发布时间】:2015-05-09 03:47:37
【问题描述】:
我在获得 oauth2 令牌后向 Google Contacts API 发出以下请求。
$.ajax({
url: 'https://www.google.com/m8/feeds/contacts/XXXXXXXXX@gmail.com/full?access_token=' + authData.authorizationCode + '&alt=json',
dataType: "jsonp",
success:function(data) {
console.log((data));
}
});
这会产生以下 GET HTTP 请求:
https://www.google.com/m8/feeds/contacts/XXXXXXXXX@gmail.com/full?access_token=4/95N2f8xA1XXXXXXXXXXXXXXQC3BtuuMbk.Aug-7c4GLLMZXmXvfARQvtgU5IVtmgI&alt=json&callback=jQuery111XXXXX1426XXX03&_=1431142848004
但是 google 回复 状态码:401 需要授权
【问题讨论】:
标签: google-api google-oauth google-contacts-api