Closed janvda closed 4 years ago
Interesting links:
Further investigation revealed that the access token expires after 1 hour.
google.auth.OAuth2 is automatically retrieving new access token using the refresh token but the new access token is not used by Photos()
.
For this googlephotos
library will be extended with a new method to update the access token => see https://github.com/roopakv/google-photos/issues/19
when the acces_token expires, it is also not automatically refreshed or more precisely the method oauth2Client.on('tokens', ...
is never triggered.
So, it is not clear how I can "force" an automatic refresh of the access token. See also https://github.com/googleapis/google-api-nodejs-client/pull/1177
See also https://github.com/googleapis/google-api-nodejs-client/issues/1256
This has been fixed by commit 43d3387b2186376eaec282c66073a1a1d9cd4df3 and earlier commits.
So it will during startup use the refresh token to request a new access token.
More precisely the following error is raised in node-red editor: