【问题标题】:(403) Access Not Configured when adding event to calendar(403) 将事件添加到日历时未配置访问
【发布时间】:2012-10-08 23:36:24
【问题描述】:

今天我在向日历添加新事件时开始收到此错误:

Fatal error: Uncaught exception 'apiServiceException' with message
 'Error calling POST https://www.googleapis.com/calendar/v3/
calendars/[cal-id]@group.calendar.google.com/events?alt=json&key=[dev-key]:
 (403) Access Not Configured' in /[...]/src/io/apiREST.php:86
 Stack trace: #0 /[...]/src/io/apiREST.php(56): apiREST::decodeHttpResponse(Object(apiHttpRequest)) 
 #1 /[...]/src/service/apiServiceResource.php(148): apiREST::execute(Object(apiServiceRequest)) #2 /[...]/src/contrib/apiCalendarService.php(472): 
apiServiceResource->__call('insert', Array) #3 /[...]/index.php(160): EventsServiceResource->insert('[cal-id-part]...', 
Object(Ev in /[...]/src/io/apiREST.php on line 86

到目前为止它运行良好,我没有更改任何代码。

【问题讨论】:

    标签: php google-api google-calendar-api oauth-2.0


    【解决方案1】:

    我在使用 PHP 访问 Google Analytics 数据时遇到了类似的问题。我通过确保在我的 API 控制台中为我的项目打开分析服务来修复它:https://code.google.com/apis/console/

    您可能需要开启日历服务。当有人遇到翻译服务问题时,请参阅下面的链接以获取进一步说明:

    Translation api has stopped working

    【讨论】:

      【解决方案2】:

      不知道这是否会对某人有所帮助。 我有同样的错误,我已经尝试了一切。然后我从 config.php 中删除了“developer_key”,它起作用了。请注意我使用的是服务帐户https://developers.google.com/accounts/docs/OAuth2ServiceAccount

      【讨论】:

      • 谢谢!整天都在找问题。我正在通过 PHP 客户端使用日历 API。这段代码过去可以工作,但在某些时候停止了,注释掉 $client->setDeveloperKey('...') 是票
      【解决方案3】:

      好吧,他们发布了新版本,这显然导致了错误。现在得到了最新版本,它再次运行良好。

      【讨论】:

        【解决方案4】:

        也不知道这是否会对某人有所帮助。

        转到您的 Google 帐户中的相应日历设置页面,编辑一些琐碎的内容并再次明确保存,也可能会有所帮助(或再次重新保存以恢复旧设置)。有时谷歌服务器对接受任何新设置有些犹豫,尤其是“共享”设置。检查您的哪些服务帐号具有“可以编辑”或“是所有者”的权限级别。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-03-04
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多