当前位置: 首页 > 知识库问答 >
问题:

.NET的Google OAuth2客户端库支持access_token还是refresh_token?

郗学
2023-03-14
    null
static void Test()
{
  string baseUrl = "https://www.googleapis.com/drive/v3/files";
  string token = "ya29.ImC1B_sds9zLKAlruaMvkWqcw6vA_0oXRk4HOjLP4Du3S5TzBCg";             
  httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
  string response = client.GetStringAsync(baseUrl + "/?q=mimeType='application/vnd.google-apps.spreadsheet'").Result;
}

有什么方法可以使用Google Client.NET库来刷新access_token,或者我必须为此使用REST API吗?

共有1个答案

柴俊捷
2023-03-14
    null
 类似资料:
  • 第一个twisted支持的诗歌服务器 尽管Twisted大多数情况下用来写服务器代码,但为了一开始尽量从简单处着手,我们首先从简单的客户端讲起。 让我们来试试使用Twisted的客户端。源码在twisted-client-1/get-poetry.py。首先像前面一样要开启三个服务器: python blocking-server/slowpoetry.py --port 10000 poetry

  • 我正在编写一个Spring webservice客户机,它调用一个SOAP服务,它返回一个带有附件的SOAP响应(MTOM->XOP include tag in response)。 在我当前的客户机代码中,我使用了SaajSoapMessageFactory并在WebServiceTemplate中注入了相同的内容,我还在封送器中将MtomEnabled设置为true。 客户端的SaajSoa

  • ★表示该语言的推荐客户端。 ActionScript as3redis Repository cwahlers C hiredis ★ Repository antirez pnoordhuis 这是官方的C语言客户端。支持全部的set命令,管道,事件驱动编程 credis Repository libredis Repository 通过poll,ketama哈希支持在多服务器上并行执行命令 C

  • Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

  • 问题内容: 我正在使用需要支持以下方案的GWT应用程序: 服务器位于时区A 客户端的浏览器设置为时区B GWT应用程序配置为在时区C中显示日期/时间 由于GWT不支持Calendar,并且不存在对javascript时区的本地支持,因此我无法想到一个解决此问题的好方法。 你们有没有做过类似的事情,或者您知道我可以使用的任何好工具吗? 谢谢! 问题答案: 以我的经验,在处理gwt中的日期和时区时,以

  • 我想知道如何将缓存配置添加到Vertx http web客户端。 使用Apache http客户端,我可以轻松地设置setCacheConfig 有什么想法吗?