google apps - Drive push messages - spammed by notifications -
i developing system synchronizing files between google drive , external storage. trying process push notifications. able register them , receive them. after receiving each notification, acquire list of changes using proper endpoint , try new version of file if necessary, flow that:
- subscribe notifications using
changes.watch
- receive push message url changes
- use api provided query changes on
changes.list
endpoint - filter items changed after particular moment
- get content of file , transfer service
it seems after initial notify message, google starts spamming new one, after getting file. suspect action of getting file content changing timestamp on file , therefore - content changed.
is possible not modify file in way when getting content?
edit:
it seems behaviour concerns files.export endpoint - exporting google doc pdf leads notifications spam too. commenting out export part in code stops them coming.
you're getting spammed since changes: watch listens more changes made user, not file itself.
what need use in scenario files: watch. subscribes listen changes file itself.
Comments
Post a Comment