Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google drive api Google Drive Api:在本地环境上接收推送通知_Google Drive Api_Localhost - Fatal编程技术网

Google drive api Google Drive Api:在本地环境上接收推送通知

Google drive api Google Drive Api:在本地环境上接收推送通知,google-drive-api,localhost,Google Drive Api,Localhost,我对从google drive api接收更改通知感兴趣 为了接收通知,您必须使用必须接收通知的地址发出http请求: 例如: POST https://www.googleapis.com/drive/v3/changes/watch Authorization: Bearer auth_token_for_current_user Content-Type: application/json { "id": "4ba78bf0-6a47-11e2-bcfd-0800200c9a77",

我对从google drive api接收更改通知感兴趣

为了接收通知,您必须使用必须接收通知的地址发出http请求:

例如:

POST https://www.googleapis.com/drive/v3/changes/watch
Authorization: Bearer auth_token_for_current_user
Content-Type: application/json

{
  "id": "4ba78bf0-6a47-11e2-bcfd-0800200c9a77", // Your channel ID.
  "type": "web_hook",
  "address": "https://somedomain.com/notifications", // Your receiving URL.
  ...
  "token": "target=myApp-myChangesChannelDest", // (Optional) Your channel token.
  "expiration": 1426325213000 // (Optional) Your requested channel expiration time.
}
如您所见,我正在设置google在
上发送推送通知。”https://somedomain.com/notifications“

然而,我在本地/开发行为环境中,需要在本地ip上接收通知


有其他选择吗。

您可以使用,或。要安装它们,只需点击它们的链接即可

它们允许您向世界公开您的
localhost
,以便进行测试

Ngrok示例:
Ngrok http


Localtunnel示例:
lt--port

尝试了这个。不工作,因为谷歌需要域验证。我真的被困在这里了你是怎么克服的?我现在被困在这里。