Reputation: 3314
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: {[email protected] 2776948}
current user: [email protected]
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...
Upvotes: 0
Views: 583
Reputation: 112787
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}
Upvotes: 1