I have a user X (an account that all the team shares) that has files in Google Drive stored in 'My Unit'. Among those files, some are shared with other users, and some others aren't. I need to access both types of files with Google Drive API.
For authentication, I use a service account (JSON file of the Key). My personal user is the owner and creator of the service account in a certain project in Google Cloud. User X is added as editor in this project. Also, X is Editor and Service Account Admin of the service account, which has as well Editor role for Google APIs Service Agent. The scopes of the project are:
https://www.googleapis.com/auth/drive.appdata, https://www.googleapis.com/auth/drive
I can successfully connect to Google Drive API, but when it comes to get a list of files, the result is empty. If I try to retrieve a specific drive file id, I also get an error, that says the file is not found.
What else do I have to do for connecting to google drive?