本文介绍了Google Calendar API服务令牌只具有读者访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在访问Google Calendar API并使用服务令牌对由应用程序为域帐户拥有的日历进行身份验证。当我打电话给calendar.events.list时,我得到了回应:

I'm accessing the Google Calendar API and authenticating with a service token to a calendar owned by an apps-for-domains account. When I call calendar.events.list, I get the response:

{ kind: 'calendar#events',
  etag: [snip],
  summary: [snip],
  description: [snip],
  updated: '2014-11-16T12:33:06.434Z',
  timeZone: 'Europe/London',
  accessRole: 'reader',                <------ this is the problem
  defaultReminders: [],
  nextSyncToken: [snip],
  items: [] }

我希望能够写入日历。令牌的 accessRole reader 。如何授予服务令牌作者访问日历?我尝试使用Google日历网络用户界面为服务令牌的电子邮件地址提供进行更改并管理共享权限,但当我保存时,它会自动更改为查看所有活动详细信息。

I would like to be able to write to the calendar. The token's accessRole is reader. How do I grant the service token writer access to the calendar? I have tried using the Google Calendar web UI to give "Make changes AND manage sharing" access to the service-token's email address, but it automatically changes to "See all event details" when I save.

推荐答案

Web UI将只允许您与来自Google Apps帐户所在域的用户共享日历。为了使用服务帐户,您必须在Apps管理员中授予其权限,如(在步骤4中,选项的名称是错误的,我无法准确记住它,但它是页面中的第3个链接)。

The web UI will only allow you to share the calendar with users from the same domain as your Google Apps account. In order to use the service account, you have to give it permission in the Apps Admin, as described here (in the step 4 the name of the option is wrong, I can't remember it exactly, but it's the 3rd link in the page).

这篇关于Google Calendar API服务令牌只具有读者访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 01:02
查看更多