如何通过 Google Drive API 使用刷新令牌生成访问令牌? [英] How to generate access token using refresh token through google drive API?

查看:51
本文介绍了如何通过 Google Drive API 使用刷新令牌生成访问令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已完成授权步骤并获得访问令牌和刷新令牌.

接下来我应该怎么做才能使用我通过 Google Drive API 存储的刷新令牌生成访问令牌?

我将无法使用任何 sdk,因为我在 Force.com 上工作,所以请建议直接通过 API 实现它的方法.

解决方案

如果您想自己实现,Web 服务器应用程序的 OAuth 2.0 流程记录在 https://developers.google.com/accounts/docs/OAuth2WebServer,特别是您应该查看有关使用刷新令牌的部分:

https://developers.google.com/accounts/docs/OAuth2WebServer#refresh

I have completed steps of authorization and obtained access token and refresh token.

What should I do next to generate access token using refresh token that I have stored through google drive API?

I won't be able to use any sdk since I am working on Force.com so please suggest the way to implement it directly through the API.

解决方案

If you want to implement that yourself, the OAuth 2.0 flow for Web Server Applications is documented at https://developers.google.com/accounts/docs/OAuth2WebServer, in particular you should check the section about using a refresh token:

https://developers.google.com/accounts/docs/OAuth2WebServer#refresh

这篇关于如何通过 Google Drive API 使用刷新令牌生成访问令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆