问题描述
我可以使用以下代码在Windows .net控制台应用程序中获取访问和ID令牌:
var credential = await GoogleWebAuthorizationbroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = "xxxxx.apps.googleusercontent.com",ClientSecret = "3xxxxxxxxxk"
},new[] { PeopleServiceService.Scope.UserinfoEmail },"user",CancellationToken.None,new FileDataStore("authfolder"));
以上代码成功后,两个令牌都存储在%appdata%/ authfolder中的文件中。
然后如何使用访问令牌读取用户电子邮件?我假设我需要创建一个服务,但是我不知道哪个。 一个例子,将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)