Several things are needed before accessing Files via API in google drive.
- Create a Project in the google cloud.
- Set up a service Account to manage access.
- Download the Service account json. It service as credential for accessing the data. Therefore it has to be kept secret.
- Add the client_email of the service account (found in the .json) to the permised list of viewers in the Google drive Data file(s).