oauth 2.0 - Does Firebase provide access token for consuming Google API's (Contacts, Calender)? -


i have code accessing google contacts api using firebase. authenticates user , returns access_token not seem work accessing contacts api(i using angularfire). here code:

var ref = new firebase("<<firebase-app>>"); $scope.click = function() {     ref.authwithoauthpopup("google", function (error, authdata) {         if (error) {             console.log("login failed!", error);         } else {             console.log("authenticated payload:", authdata);             console.log(authdata.google.accesstoken);             var resource = "https://www.google.com/m8/feeds/contacts/default/full?alt=json&access_token=" + authdata.google.accesstoken;             $.getjson(resource,function (response) {                         console.log(resource);                     });         } 

the error received is: https://www.google.com/m8/feeds/contacts/default/full?alt=json&access_token… 401 (ok)

here format of authdata received:

-auth    -provider    -uid -expires -google     -accesstoken     -displayname     -id     -cacheduserprofile -provider -token -uid 


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -