service-accounts

How to access Team Drive using service account with Google Drive .NET API v3

我们两清 提交于 2019-12-17 19:46:10
问题 Does anyone know which configurations should be done to grant Google service account an access to a Team Drive which is already created? The idea is to use a service account in a .NET backend application for uploading/downloading files to/from Team Drive which is shared among company employees. For example, company has its company.com domain and provides name.surname@company.com user accounts at Google. Also there is a Team Drive for the employees. One of those accounts (not admin) was used

google service account example returns “Error refreshing the OAuth2 token { “error” : “invalid_grant” }”

谁说我不能喝 提交于 2019-12-13 11:35:25
问题 My goal is to make the simplest query on Google Fusion Tables on behalf of my web app users. For that, I created a service account on google console. Here is the code: // Creating a google client $client = new \Google_Client(); // setting the service acount credentials $serviceAccountName = 'XXXXX.apps.googleusercontent.com'; $scopes= array( 'https://www.googleapis.com/auth/fusiontables', 'https://www.googleapis.com/auth/fusiontables.readonly', ); $privateKey=file_get_contents('/path/to

Google cloud storage: The caller does not have permission

寵の児 提交于 2019-12-13 07:39:06
问题 I am trying to rotate key to access GCS bucket using service account and API. I have enabled all roles to my service accounts but still i am getting error as follows. { "code" : 403, "errors" : [ { "domain" : "global", "message" : "The caller does not have permission", "reason" : "forbidden" } ], "message" : "The caller does not have permission", "status" : "PERMISSION_DENIED" } Here is my code: public static void main(String[] args) { HttpTransport transport; try { transport =

Azure App Service Authentication with Google oAuth 2.0 Bearer Token

本小妞迷上赌 提交于 2019-12-13 06:09:32
问题 We are using App Service Authentication to protect a web API and using Google as authentication provider. It works as expected when we fire a request from a browser (when the session information is in the cookie) IIS log: 2016-05-29T13:51:19 PID[3600] Verbose Received request: GET https://XXXXXX.azurewebsites.net/api/user 2016-05-29T13:51:19 PID[3600] Verbose Found 'AppServiceAuthSession' cookie for site 'XXXXXX.azurewebsites.net'. Length: 728. 2016-05-29T13:51:19 PID[3600] Verbose

how can I key rotate for google cloud storage service account?

半腔热情 提交于 2019-12-12 18:29:42
问题 I have written code for accessing GCS bucket to store files thru API in java which takes JSON credential file. I have created that JSON file from google console. I need to automate the JSON file or key rotation for every 90 days. How to regenerate/rotate that JSON file? I am a newbie to GCS. import java.io.IOException; import java.security.GeneralSecurityException; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpMethods; import com

Youtube API : Service account

核能气质少年 提交于 2019-12-12 11:46:19
问题 I need help for YouTube API. I guess that I have to use service account because I need more then 10 users use same account. I am not sure why I get empty items list for playlists request. Should I create some connection between @developer.gserviceaccount.com and my e-mail. I try to add it as alternative e-mail but it is already associated with another Google Account. This is code i used: const CLIENT_ID = 'xx.apps.googleusercontent.com'; const SERVICE_ACCOUNT_NAME = 'xx@developer

Access Google Calendar API using Service Account Authentication

ぃ、小莉子 提交于 2019-12-12 11:25:31
问题 I was able to access the Google Calendar API using the .NET Quickstart tutorial and it worked great! The problem with that tutorial is that it uses Open Authentication or OAuth2 . I will like to do the same using Service Account Authentication. (https://support.google.com/googleapi/answer/6158857?hl=en) Can someone give me an example of how I can access my calendar using a Service account key file? I have tried also tried using Google Calendar API Authentication with C# tutorial and was not

Accessing Google Contacts Api via OAuth 2.0 and private key aka Service Account

纵然是瞬间 提交于 2019-12-12 08:09:59
问题 I am currently implementing access to Google Contacts via OAuth 2.0 and a so called Service Account. The service account is generated for an ordinary user like "My.Name@gmail.com". The code to generate the OAuth 2.0 credentials is: public static GoogleCredential getCredentials() throws GeneralSecurityException, IOException { GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(SingleUserCredentials.SERVICE

Impersonate the user EMAIL ID using Google Oauth2 Credentials ‘Service Account’

守給你的承諾、 提交于 2019-12-12 06:18:54
问题 I am trying to create Google calendar events using Google Api OAuth service Account from PHP GAE. I need the correct Session ID or the user EMail ID in the Calendar events field ‘created by’ . This is possible well in Google Apps Script(GAS) , it creates the events with the correct session ID. But, I want the same to be done in PHP GAE(Google App Engine) . So, I tried to impersonate the user ID as follows:Perform Google Apps Domain-Wide Delegation of Authority My aim is to insert the correct

where are my upload to google drive's files for service account

冷暖自知 提交于 2019-12-12 04:56:52
问题 I have the code below that uploads a file to my Google service account. It is working, but I want to know where is the file? Which account can I use to login to google drive and get the file and how much space can I use? Is there anything like google drive UI for service accounts? private static Google.Apis.Drive.v2.Data.File insertFile( String title, String mimeType, MemoryStream FileStream) { String serviceAccountEmail = "XXXXXX@developer.gserviceaccount.com"; var certificate = new