0

I'm developping a NodeJS server application in which I'd like to access to file in a Google Drive (I'm the owner of the Drive and the file I'd like to access is a shared file). I've tried to follow the indication provided by Google at https://developers.google.com/identity/protocols/OAuth2WebServer but I'm stuck at the consent page step since in my case there won't be any user behind a browser.

I've search the net and found similar questions but I'm always confused by the answers (in this question for example there two answers with and without service account).

Can anyone help me with this problem and tell me what is the best way to tackle this problem?

Best Regards,

Yukinoe
  • 15
  • 3

1 Answers1

0

You need to use service accounts. See Google's documentation on Using OAuth 2.0 for Server to Server Applications. You then make a call telling the Service Account to impersonate you to get the file off Google Drive.

Mark S.
  • 3,849
  • 4
  • 20
  • 22