您无权调用getContacts [英] You do not have permission to call getContacts

查看:48
本文介绍了您无权调用getContacts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发GMail插件,该插件将所有用户的联系人拉出到卡中:

I'm developing the GMail Add-on that pulls out all user's contacts to card:

var contacts = ContactsApp.getContacts();

我已经在Google API控制台中启用了ContactsAPI并添加了范围: https://www.googleapis.com/auth/contacts.readonly

I already enabled ContactsAPI in Google API Console and added scope: https://www.googleapis.com/auth/contacts.readonly

但是错误仍然存​​在,并且该项目的高级Google服务弹出窗口中缺少Contacts API.

But the error is still there and the Contacts API is missing in the project's Advanced Google Service pop-up.

推荐答案

通过反复试验和这个难以找到的列表我设法使ContactsApp.getContacts()开始工作.您需要添加以下范围:

Through trial and error, and this hard-to-find list I managed to get ContactsApp.getContacts() to work. You need to add this scope:

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

这篇关于您无权调用getContacts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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