【问题标题】:Unable to access gmail contacts via gmail addon (oauth scopes included already)无法通过 gmail 插件访问 gmail 联系人(已包含 oauth 范围)
【发布时间】:2018-07-03 13:43:03
【问题描述】:

我正在尝试在我的插件中执行此操作,但出现错误

您没有权限调用 getContact [line: 37, function: addOnLogic, file: app]

var contact = ContactsApp.getContact('john.doe@example.com');

我添加了以下范围。

"oauthScopes": [
"https://www.googleapis.com/auth/gmail.addons.execute", 
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.addons.current.action.compose", 
"https://www.googleapis.com/auth/script.external_request",
"https://www.google.com/m8/feeds/",
"https://www.googleapis.com/auth/contacts" ]

权限:

【问题讨论】:

    标签: google-apps-script gmail-addons


    【解决方案1】:

    从这个SO post,建议添加this scope

    "oauthScopes": [
      "https://www.google.com/m8/feeds",
    

    ContactsApp.getContacts() 工作。

    【讨论】:

      猜你喜欢
      • 2017-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-14
      • 1970-01-01
      • 2014-06-22
      • 2016-09-27
      • 1970-01-01
      相关资源
      最近更新 更多