How to test safely an app that reads and writes to Google Drive using the API?
I created an app that runs on a server, that basically copies a template google doc to another directory, and then edits this new file.
In order to do that I:
- created a service account,
- delegated domain-wide authority to this service account (https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority),
Then the app impersonates a user of the domain (always the same user) to access the API resources.
This app works, but it has 2 problems:
- the service account has access to too many things. Ideally, I'd like it to have RW access to one folder only,
- I'd like to create test credentials that would have access to another specific folder only, or even better, another drive.
Thanks!