The issue you are probably having with the methods that you have used has to do with user premissions. There is a diffcence between public and private data.
- Public data is not owned by anyone anyone can see it. Youtube video search for example
- private data would be data that is owned by a user. Files on my google drive account
In order to access private user data you need the users permission to do that. The methods you are currently using are called Oauth2 authentication where a user is prompted for their consent to access their data.
Assuming that i am understanding you correctly. What you want to do is access your own data and show that to users. Normally what i would say would be that you should be using a service account. Service accounts are like dummy users who can be granted access to data. For example you could take the service account email address and share a folder on your google drive account with the service account it will then be pre authorized and when ever you use it to authenticate you will have access to those files.
The main problem here is that JavaScript does not support service account authentication you need to use a server sided programming language to use it. OAuth2ServiceAccount
Public File
If you change the permissions on the file and make it public. You can then use an api key to access it. You will not be able to update it using an api key though. You will only be able to read it.