I am able to retrieve profile information via an AJAX call in Jquery using this code:
var url = 'https://www.google.com/m8/feeds/profiles/domain/{DOMAIN_NAME}/full';
$.ajax({
url: url
+'?access_token='
+accessToken,
headers: {
'GData-Version': '3.0',
'If-Match': '*'
},
async: false,
dataType: 'text',
success: function(data) {
$('#result').text(data);
}
});
};
However when I try to retrieve a picture with the same access token:
var url = 'https://www.google.com/m8/feeds/profiles/domain/{MY_DOMAIN}/full/{USER_NAME}';
$.ajax({
url: url
+'?access_token='
+accessToken,
headers: {
'GData-Version': '3.0'
},
async: false,
dataType: 'text',
success: function(data) {
$('#result').text(data);
}
});
I get the error: 401 (Token invalid - AuthSub token has wrong scope)
The scope I'm using is the one provided on the profile data api page: https://www.google.com/m8/feeds/profiles
How do I get the correct authorization? Does the access token provided not do the job?
Try using this path as scope
You can refer this post