1

I have the requirement of saving files to google drive of Admin account and then retrieving. Now i am able to upload the files to Users google drive account which is in his phone, i am not able to give static credentials of my drive. Is there any Possibility?Please give the reference of giving static credentials to the google drive to save and retrieve the files.

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
Hari krishna
  • 1,142
  • 1
  • 12
  • 29

1 Answers1

0

First, be aware of the security implications of embedding static credentials. As a minimum, use only drive.file scope, so the credentials only allow access to files created by the app.

The "static credential" you are referring to is a Refresh Token. You will use this to fetch an Access Token whenever your app needs to access GDrive. This answer How do I authorise an app (web or installed) without user intervention? (canonical ?) describes the detailed steps to follow.

You should also consider using a Service Account instead of a regular account for the app's storage.

Community
  • 1
  • 1
pinoyyid
  • 21,499
  • 14
  • 64
  • 115