Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
I'm getting a 401 response when calling service.files.create() for a multipart upload using expired credentials. Same code works for other methods as drive.files.list(), also executing drive.files.list() before service.files.create() makes the second call work as expected (See attached code snippet for details).
Steps to reproduce
Setup expired credentials for the example code provided.
Run the app without params to see get the 401 response. node .\index.js
Run the app with --all arguments to get the 200 expected response. node .\index.js --all
Question
Shouldn't drive client have the same behavior for all methods?
Setting up expiry_date property fix the issue. I'm raising this question because I will expect the same behavior for the other methods, but they work just fine without the mentioned property including service.files.create() when used just to create a folder.
Environment details
googleapis
version: 126.0.0Unexpected behaviour description
I'm getting a 401 response when calling
service.files.create()
for a multipart upload using expired credentials. Same code works for other methods asdrive.files.list()
, also executingdrive.files.list()
beforeservice.files.create()
makes the second call work as expected (See attached code snippet for details).Steps to reproduce
node .\index.js
node .\index.js --all
Question
Shouldn't drive client have the same behavior for all methods?
Setting up
expiry_date
property fix the issue. I'm raising this question because I will expect the same behavior for the other methods, but they work just fine without the mentioned property includingservice.files.create()
when used just to create a folder.Thanks!