Question

I'm trying to create a Google Drive Picker with "Service Account" instead of using "Client ID for web application" with Javascript.

I found a Google Picker example with Javascript that let me access to my Drive files using but using "Client ID for web application" and the "ApiKey".

It would be possible to make this process with the"Service Account" instead of an "Client ID for web application" and JAVASCRIPT?

Thank you in advance and regards.

Was it helpful?

Solution

I havent found any examples of how to use a service account with javascript. I question weither or not it is posible or even wise to try.

My reasoning, for a service account to work you need the key file now anyone that has access to the key file will then have access to the service account. There for you need to keep the key file out of the reach of children and evil hacker type people.

Javascript is client sided not server sided. There for you have to send a copy or let everyone access a copy of the key file. See the problem? Service account is meant for a server to access the accounts data, not for you to let everyone access the data. There is a slight diffrence.

I recomend you go with some kind of scripting language if you can.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top