Php 谷歌通知API确认

Php 谷歌通知API确认,php,google-calendar-api,google-api-php-client,Php,Google Calendar Api,Google Api Php Client,我已经在我的服务器上启用了Google日历推送通知API。一切正常,我只错过了最后一盘。这是返回谷歌的确认,我已经收到了消息,一切都很好。我知道我必须返回一个200的确认,但我不知道如何在GoogleAPI php客户端中实现这一点 $client = new Google_Client(); $client->setClientId($client_id); $client->setDeveloperKey($developer_key); $client->setClien

我已经在我的服务器上启用了Google日历推送通知API。一切正常,我只错过了最后一盘。这是返回谷歌的确认,我已经收到了消息,一切都很好。我知道我必须返回一个200的确认,但我不知道如何在GoogleAPI php客户端中实现这一点

$client = new Google_Client();
$client->setClientId($client_id);
$client->setDeveloperKey($developer_key);
$client->setClientSecret($client_secret);
$client->setRedirectUri($redirect_uri);
$client->addScope("https://www.googleapis.com/auth/drive");
$client->addScope("https://www.googleapis.com/auth/calendar");
$client->setAccessType('offline');  

$refresh_token = $user['refresh_token'];
$client->refreshToken($refresh_token);  


$service = new Google_Service_Calendar($client);

这是我使用的代码的一部分。

响应代码200是默认值。另一个选项是使用http_响应_代码(200)或使用框架提供的任何东西显式设置它。抱歉,google api php客户端中没有专门的代码可以为您接收推送通知。

请包含您用于接收推送通知的代码好吗?如果没有它,我可以告诉您,响应代码200是默认的响应代码。您可以使用http\u response\u代码(200)或您的框架提供的任何东西来显式地设置它,如果您愿意的话,但您不需要这样做。好的,google api php客户端中没有什么特别的功能可以为您接收通知。如果您使用http_response_代码(200)进行回答,我将给出相应的回答标记。谢谢你的帮助!