c# - Error (403) Forbidden after successfull authentication on Google Calendar API with Xamarin.Auth -


i developing xamarin app (ios, android, osx , windows) , have implement calendar synchronization between app , 1 user calendar.

this have tried:

account useraccount; var auth = new oauth2authenticator(                "xxxxxxxxxx.apps.googleusercontent.com", //cliendid                "xxxxxxx", //clientsecret                calendarservice.scope.calendar, //scope                new uri("https://accounts.google.com/o/oauth2/auth"), //authorizationuri                new uri("https://www.googleapis.com/plus/v1/people/me"), //redirecturi                new uri("https://accounts.google.com/o/oauth2/token")); //tokeuri  auth.completed += (sender, e) => {     if(e.isauthenticated)     {         useraccount = e.account;          var request = new oauth2request(                     "get",                     new uri("https://www.googleapis.com/calendar/v3/users/me/calendarlist"),                     null,                     useraccount);          request.getresponseasync().continuewith(r =>         {             if(r.isfaulted)             {                 var = r.exception.innerexception.message;             }             else             {                 var json = r.result.getresponsetext();             }         });     }     else     {                 //show message failed     } }; 

the problem e.isauthenticated returns true once try calendar list pass useraccount got in step before 403 error (e.isfaulted true).

any ideas need list of calendars?


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -