【问题标题】:How to set resource when creating OAuth service in Google App Script在 Google App Script 中创建 OAuth 服务时如何设置资源
【发布时间】:2021-03-07 17:18:46
【问题描述】:

在 Postman 中,我将 GET 请求设置为可以在请求正文中使用 grant_type、client_id、client_secret 和资源获取正确访问密钥的位置。

我正在尝试在 Google App Script 中使用它,但是似乎没有 setResource 函数。我浏览了文档,找不到替代方法。是否可以通过 Google App Script OAuth2 以某种方式设置资源以获取正确的访问密钥? https://github.com/googleworkspace/apps-script-oauth2/blob/master/dist/OAuth2.gs

【问题讨论】:

    标签: google-apps-script oauth-2.0 google-oauth


    【解决方案1】:

    您可以使用.setParam()设置额外的参数来构造授权URL。

    .setParam('resource', 'https://storage.azure.com/')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-16
      • 1970-01-01
      • 2015-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-01
      相关资源
      最近更新 更多