13

How can I login to a Google Service account with the normal web user interface, for example to google drive ?

Now I can only login using API using script.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
ButuzGOL
  • 1,233
  • 2
  • 13
  • 27

1 Answers1

15

You cant. A service account is a sudo user type thing. Yes it has a Google drive account, Google calendar ... but you cant log in to the web interface for Service accounts.

Option / work around / Tip:

There is a slight workaround. You could have the service account give your Google account access to a directory on its Google drive. Then when you login to Google Drive web you will be able to see the files. Tip: If you want to be able to interact with the files the service account will also have to grant you access to each of the files in the directory.

You can use files.patch and permissions to achieve this.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • @DalmTo thanks for replay. Can I do api calls from browser auth as service account ? – ButuzGOL May 04 '15 at 08:56
  • Open authentication in general is a bit tricky, it requires that you can run HTTP POST any language that can do a http post can use Oauth. Browsers are HTTP GET, so its probably not going to work directly though a web browser. You are going to have to find a programing or scrypting language for this. – Linda Lawton - DaImTo May 04 '15 at 09:01
  • @ButuzGOL You can make API calls from anywhere, provided you have an access token. The real question is whether you can get an access token from a browser client for a service, and the answer is no. You either need to get an access token using a server app, and share that to the client (securely of course), or you need to revisit why you're using a Service Account in the first place and perhaps use a different solution. – pinoyyid May 04 '15 at 21:19
  • @ButuzGOLYes you can do calls from the browser using a service account. – Andre Machado do Monte Oct 19 '22 at 23:32