I want to use google contacts api v3 to get all contacts of account but when i use jquery ajax request, this error happened on every requests :
jQuery.ajax({
url: "https://www.google.com/m8/feeds/contacts/default/full",
headers: {
'Authorization': "Bearer dff55.Cj_CA27T4Fsdfsdfsdfsdfds",
'Content-Type': 'application/json'
},
method: 'GET',
dataType: 'jsonp',
jsonp: false,
success: function (data) {
console.log('succes: ' + data);
},
error: function (data) {
console.log('error');
console.log(data);
}
});
I use this doc : https://developers.google.com/google-apps/contacts/v3/
but i think something wrong with https://www.google.com/m8/feeds/contacts/default/full
because on any requests result is one thing ! readyState: 4, status: 404, statusText: "error"
!
after searching more and asking my problem from others, added
alt=json
and accesstoken to url and disablejsonp: false
andcache: true
because request need jsonp .working code is something like this :
ref : https://labs.magnet.me/nerds/2015/05/11/importing-google-contacts-with-javascript.html