service-accounts

Google service account and sheets permissions

半世苍凉 提交于 2020-01-06 06:51:11
问题 I've got a Java backend (spring + google-oauth-client) that should be able to access Google.sheets and parse some data from there. First I implemented regular "3-legged" OAuth 2.0 authentication on my local backend deploy, it worked fine, but as backend will be deployed in cloud without any browser etc it's not the best option. So I decided to use service accounts OAuth flow: created google service account and refactored my code to use it instead of AuthCodeFlow, but I saw 403 Forbidden "The

Google API to upload files using the Authentication Service Account

邮差的信 提交于 2020-01-06 04:04:06
问题 I'm trying to send files by API Google Drive, though, I can not find any documentation on how to perform C # Uploading files using the Authentication Service Account. I downloaded the Daimto library, however, he uploads using the DriveService class, when we use the authentication ClientId and ClientSecret. But using authentication for account service he returns to PlusService class, and found no way to upload files this way. Can someone help me? Best regards Using Authentication Service

service account does not have storage.objects.get access for Google Cloud Storage

我怕爱的太早我们不能终老 提交于 2020-01-02 03:32:07
问题 I have created a service account in Google Cloud Console and selected role Storage / Storage Admin (i.e. full control of GCS resources). gcloud projects get-iam-policy my_project seems to indicate that the role was actually selected: - members: - serviceAccount:my_sa@my_project.iam.gserviceaccount.com role: roles/storage.admin - members: - serviceAccount:my_sa@my_project.iam.gserviceaccount.com role: roles/storage.objectAdmin - members: - serviceAccount:my_sa@my_project.iam.gserviceaccount

Access Google spreadsheet from Google Appengine with service account : working once per hour

柔情痞子 提交于 2020-01-01 19:13:11
问题 I have implemented the python code here below based on the documentation in order to access a spreadsheet accessible through a public link. It works once every hour. If I execute a few seconds after a success, I receive an error : Error opening spreadsheet no element found: line 1, column 0 Assumption: The access token has an expiry date of 1 hour. So the appengine would proceed to a token refresh after an hour, resetting the whole. Question: This code requests a new token for each request.

How to Auth to Google Cloud using Service Account in Python?

﹥>﹥吖頭↗ 提交于 2019-12-31 12:50:15
问题 Im trying to make a project that will upload google storage json file to BigQuery (just automate something that is done manually now). And i'd like to use 'service account' for this as my script is going to be run on daily basis. After reading everything i can found about using service account im still struggling to authenticate. I wonder if someone could check and point me to what i missed? Here is what i've done so far: Created json key file for service account Installed client libraries:

Client is unauthorized to retrieve access tokens using this method

喜欢而已 提交于 2019-12-29 08:18:29
问题 I have a custom dashboard in Ruby on Rails project with data collected from Google Analytics. I user Google Analytics Reporting V4 API and a Service Account to authenticate. My code works well if I don't impersonate user authorization.sub = 'xxx@mail.com' and If I do it, I get unauthorized_client error but not all the times. Sometimes it works, and sometimes not. This is my code: scope = [Google::Apis::AnalyticsreportingV4::AUTH_ANALYTICS_READONLY] view_id = 'xxxxxx' ENV['GOOGLE_APPLICATION

getting “401 Unauthorized” while trying to authenticated with service account

随声附和 提交于 2019-12-25 03:34:20
问题 So here is the problem: Ive recently made this post. Solution I've mentionned worked for one token and one API but when I tried to handle two APIs with two token (gmail and Sheets API) it failed. So what I'm trying to do now is make the two work so I told myself "Hey let's create a service account". Even if I don't really understand the differences between both methods. Service account seems to prevent from having a consent screen (Am I right?). I've crawled the web for answers but all of

GA Management API - Custom Dimensions list() - Error 403: Insufficient Permission

若如初见. 提交于 2019-12-24 23:24:06
问题 I'm using Management API (using PY Client Library) to get list of Custom Dimensions as described here - Custom Dimensions: list link = analytics.management().customDimensions().list(accountId = ACCOUNT_ID, webPropertyId = PROPERTY_ID) dimensions = link.execute() but the API keeps returning Error Code: 403, Insufficient Permission I'm pretty sure the service account email address I'm using to build credentials object has sufficient Edit, Read & Analyse level access at the GA Account Level!. I

Google OAuth2 “ServiceAccountCredential” does not exist when using ASP.NET Core (RTM)

点点圈 提交于 2019-12-24 17:09:24
问题 I had a ServiceAccount hookup in my .NET Core RC1 app that worked fine. However now, "ServiceAccountCredential" doesn't exist in "Google.APIs.Auth.OAuth2" anymore. The whole library seems to be missing a ton of classes in the RTM version of Core. Here are the related packages in my project.json "Google.Apis.Core": "1.14.0", "Google.Apis.Auth": "1.14.0", "Google.Apis.Oauth2.v2": "1.14.0.540" I even tried using the RC1 packages, but I keep getting the same thing. Is it simply because Google

Google Drive API (.NET) - Transfer ownership from Service Account to Domain user

烂漫一生 提交于 2019-12-24 07:37:28
问题 I am creating file on Google drive with .NET client API with Service account. string[] scopes = new string[] { DriveService.Scope.Drive }; GoogleCredential credential; using (var stream = new FileStream(Directory.GetCurrentDirectory() + "/Resources/GoogleCredentials.json", FileMode.Open, FileAccess.Read)) { credential = GoogleCredential.FromStream(stream).CreateScoped(scopes); } DriveService drive = new DriveService(new BaseClientService.Initializer() { HttpClientInitializer = credential, });