Are files created using a Google Drive account when authenticating with a service account?

I'm trying to use the Google Drive APIs to send the log file created by our application to our Google Drive account, which we transfer to Android Development. Most of the examples showed how to use oAuth2 for authentication with an end-user Google Drive account, but we want files to be sent only to our Google Drive account.

After some searches, I found that I had to create an API project for our application and use the service account associated with this API project to generate the key, which we include in our project, as a raw resource for authentication using oAuth2 to get GoogleCredential which needed to create the Drive service that we will use to create our API calls.

After proper authentication, I was able to insert the file using the sample code on the Google Drive API website, and it works fine, however I don’t see the file in our Google Drive account that created the Project / Service API account, However, if I I call Drive.files (). List (). Execute () and I output the FileList to a line, I was able to see the files that our application previously inserted into the Google Apps service account.

So my question is:. Is a new Google Drive account created for the service account, separate from the Google Drive account that created the service account? If so, is there a way to log in to this account and view files using the regular Google Drive web interface so that we can get to the log files without recording another application that authenticates with the service account and then captures the files?

+4
source share
1 answer

It seems that my question turned out to be a duplicate, another question that is a little difficult for me to find. Question I don’t see the files and folders created using the code in my Google Drive , and a Google employee answered it: fooobar.com/questions/1436495 / ...

0
source

Source: https://habr.com/ru/post/1436494/


All Articles