Zend framework 谷歌日历API密钥不工作
因此,从这里访问: 在我的项目中,我刚刚启用了日历API 现在,我正在尝试做以下工作:(我的钥匙因为明显的原因而被隐藏)Zend framework 谷歌日历API密钥不工作,zend-framework,google-calendar-api,google-api-php-client,Zend Framework,Google Calendar Api,Google Api Php Client,因此,从这里访问: 在我的项目中,我刚刚启用了日历API 现在,我正在尝试做以下工作:(我的钥匙因为明显的原因而被隐藏) 我做错了什么?我正在使用服务器API密钥。几天前,我遇到了类似的问题。在www.google.com/calendar/->我的日历->日历设置和日历地址中检查您的日历ID。Id应该包含字母和数字,而不是电子邮件地址 我明白了。日历ID必须是URL编码的 $client = new Zend_Http_Client('https://www.googleapis.com/ca
我做错了什么?我正在使用服务器API密钥。几天前,我遇到了类似的问题。在www.google.com/calendar/->我的日历->日历设置和日历地址中检查您的日历ID。Id应该包含字母和数字,而不是电子邮件地址 我明白了。日历ID必须是URL编码的
$client = new Zend_Http_Client('https://www.googleapis.com/calendar/v3/calendars/en.usa#holiday@group.v.calendar.google.com/events');
$client->setParameterGet(array(
'key' => '########################',
));
$feed = $client->request()->getBody();
echo "<pre>";
print_r($feed);
exit;
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}