Php 谷歌日历API-(403)访问未配置';

Php 谷歌日历API-(403)访问未配置';,php,google-api,google-calendar-api,Php,Google Api,Google Calendar Api,我开发了一个使用谷歌日历API的应用程序 当我将它从开发环境移动到测试环境时,我在GoogleAPI控制台中为它创建了新条目,并将该信息复制到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

我开发了一个使用谷歌日历API的应用程序

当我将它从开发环境移动到测试环境时,我在GoogleAPI控制台中为它创建了新条目,并将该信息复制到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之间进行同步,对吗


有什么想法吗

我不得不评论这句话:

//“开发者密钥”=>“AIzaSyCm9tj17rd-OEPTL5xFXMWI9SQMH2BOKKI”

然后它工作了。

您需要去启用日历API的开关


这对我很有效。

在打开服务(在Google Api的“服务”选项卡下)后,我不得不等待几分钟,身份验证才成功启动。

您可以在“服务”选项卡中打开日历Api:

谢谢,Blogger API也为我提供了帮助。但是你能告诉我这是干什么的吗?