我開發了一個使用Google Calendar API的應用程序。Google Calendar API - (403)未配置訪問權限'
當我將它從開發環境移到測試環境時,我在Google API控制檯中爲它創建了新條目,並將該信息複製到config.php中。
// The application_name is included in the User-Agent HTTP header.
'application_name' => 'Google Calendar PHP Starter Application',
// OAuth2 Settings, you can get these keys at https://code.google.com/apis/console
'oauth2_client_id' => '517034425134-503uog3i6pfXk15qq6mjsfbi48sabd50o.apps.googleusercontent.com',
'oauth2_client_secret' => '4p4go-aRXVcGx4YxcgC2wgvyV',
'oauth2_redirect_uri' => 'http://mydomain/admin/calendar_events.php',
// The developer key, you get this at https://code.google.com/apis/console
'developer_key' => 'AIzaSyCm9tj17rd-OepTl5XFxMwI9SQMH2BoQkKI',
但是,我沒有訪問權限。我得到︰
Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/calendar/v3/users/me/calendarList?key=AIzaSyCm9tj17rd-OepTl5XFxMwI9SQMH2BoQkKI: (403) Access Not Configured'
我不知道這是爲什麼。我知道代碼是好的...我只需要在他們的API控制檯和我的config.php之間進行同步,對吧?
任何想法?
感謝它在Blogger API中也適用於我。但你能說出這條線是什麼嗎? – 2013-09-12 07:29:52