I'm finding the documentation on troubleshooting google.drive.files.watch to be sparse - any assistance is appreciated.
First, I'm using a service account role that has had documents & folders in drive explicitly shared with it. I'm using a free (legacy) Basic Google Suite.
How can I troubleshoot (i.e. see logs) from the Push Notifications to an HTTPS function; or figure out why it isn't working?
I.e. I've made an API call; from node.js to drive.files.watch and registered to receive a web_hook push.
I've registered the domain, and verified my service account, i.e. "it /feels/ like it should be working" --
i've found very few examples on stackoverflow for anything related to google.drive.files.watch
{
kind: 'api#channel',
id: 'tify-channel-11tyvaPDAgkIUDMPfSMzOZqi1G-YD0aWt-FAUllQhZMc',
resourceId: 'uJKV6vliOhpZK_f8ZCNVmxzsx1c',
resourceUri: 'https://www.googleapis.com/drive/v3/files/11tyvaPDAgkIUDMPfSMzOZqi1G-YD0aWt-FAUllQhZMc?acknowledgeAbuse=false&supportsTeamDrives=false&alt=json',
expiration: '1535699196000' } }
When the document is updated, then I think it should send a notification to my lambda URL (registered to a custom verified domain) // I check the logs in AWS Cloudwatch but see no attempts // no record of traffic (and I've verified any request to the webhook url from my browser does appear in logs)
If I try to access the URI in the resourceUri then I'm told I don't have enough API calls. ;-(
ex: https://www.googleapis.com/drive/v3/files/11tyvaPDAgkIUDMPfSMzOZqi1G-YD0aWt-FAUllQhZMc
Results in:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
}
What and how I can /signup/ above is eluding me. Not sure if it's relevant, but I also can't seem to get drive.changes.list to output any data, not sure if it's because I'm using a service account and so the file changes aren't made inside that account.
When I use google-api-explorer and oauth as myself, make changes to the file drive.changes.getStartPageToken + drive.changes.list both succeed (HTTP 200 response) but contain no data -- aside from a valid pageToken.
Also - drive.files.get also works and returns data so I don't think it's an access control problem to the file itself.
Any help or ideas are appreciated!