2
我在获得oauth2令牌后向Google Contacts API发出以下请求。Google Contacts API 401需要授权
$.ajax({
url: 'https://www.google.com/m8/feeds/contacts/[email protected]/full?access_token=' + authData.authorizationCode + '&alt=json',
dataType: "jsonp",
success:function(data) {
console.log((data));
}
});
这将产生以下GET HTTP请求:
https://www.google.com/m8/feeds/contacts/[email protected]/full?access_token=4/95N2f8xA1XXXXXXXXXXXXXXQC3BtuuMbk.Aug-7c4GLLMZXmXvfARQvtgU5IVtmgI&alt=json&callback=jQuery111XXXXX1426XXX03&_=1431142848004
但是谷歌回应回来状态代码:401授权所需
我得到相同的错误....你在哪里添加访问令牌?你可以请提供代码片段...我想花几个小时.. –