douxiuyi6529 2016-09-26 10:37
浏览 32

Gmail API发布/订阅推送未停止

I am developing with the Gmail API, and everything is working, I can authorize a user account to Push emails to my endpoint and send the next History ID. The issue is with removing the account. I have deleted the account from the Google Cloud Platform, I have removed the app from Account/Settings/Connected Apps and Sites from within Gmail, however something is STILL pushing updates to my web server. I can see the request coming in and not being authorized, but it never the less is still pushing. How do I stop it in Gmail???

I receive this on my server:

2016/09/26 10:34:30 [D] [server.go:2202] | 503 |  41.984725ms|   match|  POST    /push   r:/push
d:  {user@name.com 2776948}
current user:  user@name.com
last history id:  2776700
doing error:  Get https://www.googleapis.com/gmail/v1/users/me/history?alt=json&startHistoryId=2776700: oauth2: cannot fetch token: 401 Unauthorized
Response: {
  "error" : "deleted_client",
  "error_description" : "The OAuth client was deleted."
}

So the client is revoked, but the push still occurs. Verry weird...

  • 写回答

1条回答 默认 最新

  • duanke8011 2016-09-26 12:38
    关注

    You also have to send a request to stop watching the user's mailbox:

    POST https://www.googleapis.com/gmail/v1/users/me/stop?access_token={access_token}
    
    评论

报告相同问题?

悬赏问题

  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题