我正在Zapier的基于浏览器的传统开发人员平台上创建一个自定义的私有应用程序。 Google API需要OAuth 2,我可以使用Google在创建用户客户端后提供的凭据(通过此链接的第一个按钮)正确配置:
https://developers.google.com/identity/sign-in/web/sign-in#before_you_begin
它会生成所需的凭据:
{
"web": {
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"client_id": "1234567890example.apps.googleusercontent.com",
"client_secret": "1234567890abcexample",
"project_id": "abc123example",
"javascript_origins": [
"https://zapier.com"
]
}
}
我的问题是Zapier需要定期刷新访问令牌。它可以选择使用这个额外字段以这种方式设置它:
“刷新令牌URL(可选)我们在POST时刷新access_token。”
如您所见,Google提供了我需要的所有内容(client_id,client_secret,token_url,auth_url等),但不提供refresh_token_url。
是否有谷歌刷新令牌网址我可以插入Zapier中的这个字段来处理这个问题?
我相信你可以重复使用token_uri
,基于我见过的其他项目做同样的事情。你试过吗?