How to Connect to a Google Public Calendar

空扰寡人 提交于 2019-12-08 04:12:54

问题


I am trying to build a script to retrieve all my events using the new Google Calendar API v3 since Google deprecated v1 and v2 on 11/17/2014.

I am receiving this error:

Fatal error: Uncaught exception 'Google_Service_Exception' with message 'Error calling GET https://www.googleapis.com/calendar/v3/calendars/MY-PUBLIC-CALENDAR/events: (403) Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.' in /usr/local/lib/php/google-api-php-client/src/Google/Http/REST.php:76 Stack trace: #0 /usr/local/lib/php/google-api-php-client/src/Google/Http/REST.php(41): Google_Http_REST::decodeHttpResponse(Object(Google_Http_Request)) #1 /usr/local/lib/php/google-api-php-client/src/Google/Client.php(548): Google_Http_REST::execute(Object(Google_Client), Object(Google_Http_Request)) #2 /usr/local/lib/php/google-api-php-client/src/Google/Service/Resource.php(190): Google_Client->execute(Object(Google_Http_Request)) #3 /usr/local/lib/php/google-api-php-client/src/Google/Service/Calendar.php(1561): Google_Service_Resource->call('list', Array, 'Google_Service_...') #4 /home/sme/public_html/app/mods/googleCalendar_3.0/cache_events.php(71): Google_Service_Calendar_Events_Resource->list in /usr/local/lib/php/google-api-php-client/src/Google/Http/REST.php on line 76

Does the (403) Daily Limit for Unauthenticated Use Exceeded mean I can no longer test and troubleshoot my script today? Really?

How long do I need to wait to resume working? What's the workaround? Why would Google stop us from building a script?


回答1:


Some of the Google APIs let you access them using a public non authenticated user. It is not hooked to a project on Google Developer console due to that fact there is a very strict limit to how much data you can request from it.

(403) Daily Limit for Unauthenticated - Means that you are running with that. non authenticated user. You need to fix your code to use a client id from Google Developer console.



来源:https://stackoverflow.com/questions/27135577/how-to-connect-to-a-google-public-calendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!