Access using google service account

is it possible to create a remote using google service account? there is no login info for service account, only private key and private auth key. is there anyway we can create authorize key using service account?

Yes, you can.

It's documented on the Google Drive page:

i made service account. now how can i select service account for upload? if i use remote name it still using main gmail account.

You can make another remote to use the service.
You can configure the existing account to use a service account instead.

It gives an example on step 3 on the URL linked.

1 Like

thank you for quick reply. i set the service account path

service_account_file> /home/foo/myJSONfile.json

now how can select which service account should use for upload?

That's not how it works.

You use it for a remote and all functions of that remote.

my remote is=>
i created multiple service accoun=> files.jason
inside jason file there is service account info like private key, private key id, client email etc.

service account email has no password. how can i create remote name using service account?

sorry i am kind of lost. probably i asking really dumb question :frowning:

You make your remote look like #3:

What goal are you trying to accomplish with service accounts?

1 Like

team drive has 750gb limit/day. so i would like to upload using service account. once main gmail account upload quota finish. i will use service account for upload.

Service accounts just use user quota so not sure that does anything as it's not generally recommended to try to bypass quotas.

That being said, just make a remote as I shared above using the service account and point to that.

1 Like

please let me know if i am right or wrong

  1. i create new remote name
  2. i use service account client id.
  3. i set service account folder path
  4. when rclone asking for auth code i use my gmail for login and get the auth code and give access.

now rclone will use my service account for upload for that remote account right?

i am not an expert with gdrive but i do use a service account.

there is no need for step 4.
in fact, when you choose to use a service file, rclone will not ask for you to login

and here is the the remote should look like

type = drive
scope = drive
service_account_file = C:\data\rclone\scripts\rr\other\\test01-309420-6f8144bb217f.json
1 Like

working great. thank you so much

another question:

i created service account. if i have access to a team drive (view/not public) can i use server side copy using service account to my other drive? i assume even though main gmail has access to both team drive service account don't have permission to view file from first team drive, right?

sorry, i do not know.

you can just try it using a debug log and see what happens.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.