Google Sheets Service requires login even when scripted

Hi there!
I've looked for this issue in the forums but it's so specific or maybe I'm just searching in the incorrect way.

Context: DevOps team have found an internal use case in the project which is a good point to avoid a bottleneck.
It is about localization pulling. Instead of get the localizators warn the programmers to pull all the tables, we have created a tool which pull all localization tables from Google Drive then commits it to the repo. It's in TeamCity's CI/CD pipelines, btw.

But, the problem is that agents get stuck constantly because they need to login in the Google Drive window. So, how should we automatize this process so we can do the login programatically if needed?


You can use an API Key if you are just reading the data from a public source. If you need more control then I don't think we currently support this workflow. I think we would need to add support for Google Service Accounts. Ill add a task for us to look into it.

1 Like

I was monitoring the agents and the error seems not exactly to be about "nobody logins", but like it cannot oopen de browser window by itself. This is the log.

Maybe it's easier to find a workaround?
I tried to make the localization sheet "accesible for anyone with the link" but it's not working. It tries to launch the browser nonetheless.

Oauth will always require authorization even if the sheet is public. API key will not but it requires the sheet to be public and can only read, it can not make changes.
In theory for your use case, if it's just pulling then an API key should work.
More info on API keys can be found here

Ok we will try by Friday. We think Google Drive marked API key as obsolete, that's why we use OAuth. We're giving it a try then updating this!
Thanks: :)

1 Like

It seems to be working as of now. We'll report in case anything else happens.

1 Like