service-accounts

Gmail API .NET: Get full message

天大地大妈咪最大 提交于 2019-12-12 04:15:35
问题 How do I get the full message and not just the metadata using gmail api? I have a service account and I am able to retrieve a message but only in the metadata, raw and minimal formats. How do I retrieve the full message in the full format? The following code works fine var request = service.Users.Messages.Get(userId, messageId); request.Format = UsersResource.MessagesResource.GetRequest.FormatEnum.Metadata; Message message = request.Execute(); However, when I omit the format (hence I use the

GET/ADD Events to google calendar with a service account

人走茶凉 提交于 2019-12-12 04:06:08
问题 I have to access a google calendar from a java webapplication to get and especially add events to a shared google calendar I followed the java quickstart example from google and everything works fine so far then I changed the authorize method in that example to use a service account and the authentication seems to work but the calendar List returned from google is empty I already shared the calendar with the service account email but that doesnt change anything 回答1: Service account is a dummy

Connect Google Calendar API get empty array result with php

旧时模样 提交于 2019-12-12 03:56:10
问题 I'm trying to read my Google Calendar events using PHP and Googles official PHP client library. I created a service account in the Google Developers Console and it seemed to work, I can connect to the calendar but I get an empty array: Google_Service_Calendar_CalendarList Object ( [collection_key:protected] => items [internal_gapi_mappings:protected] => Array ( ) [etag] => [itemsType:protected] => Google_Service_Calendar_CalendarListEntry [itemsDataType:protected] => array [kind] =>

Failed to request access token for Fusion Tables API with Google Service Account

好久不见. 提交于 2019-12-12 03:18:44
问题 I have been successfully using Google API (via HTTP/REST, as well as using the .NET client library) with a Google Service Account to access the files in Google Drive. Recently, I am exploring the Fusion Tables. I am able to use the API with user authorization via a web application. However, when I try to access it using Google Service Account under the same project, it failed with the below error, whenever I have https://www.googleapis.com/auth/fusiontables in the scope: https:// www

How to grant access to Youtube Reporting API for a google service account?

天涯浪子 提交于 2019-12-12 02:35:28
问题 I am trying to access YouTube Reporting API with a service account. But I am getting a 403 forbidden when trying to do youtubeReporting.jobs().list().execute() . YouTube Reporting API clearly supposed Server-to-server interaction. Do I need to grant access to Youtube Reporting API for a google service account? If so, how? FYI : I am not using google app domain. 回答1: You can do that in the Cloud Platform Console. See https://support.google.com/cloud/answer/6158841?hl=en for details 回答2: You

how to insert post to my blog in server by Service Account without any manual login

爱⌒轻易说出口 提交于 2019-12-12 02:27:17
问题 I want to insert a post to my blog by php in my server cron so there there is no any manual login. I have create Service Account and can get the post by $data = $blogger->posts->get('6284611449262742568', '4655425391398964038'); However, insert post fail with following error. data = $blogger->posts->insert('6284611449262742568', $mypost); Fatal error: Uncaught exception 'Google_Service_Exception' with message 'Error calling POST https://www.googleapis.com/blogger/v3/blogs/6284611449262742568

Firestore Denied from Service Account

不想你离开。 提交于 2019-12-11 15:27:18
问题 Now this is a bit bizarre. But I am getting a permissions error for running an update query to my Firestore database. I have set up a service account (with owner permissions) and it won't allow me to access my own database. I do have the credentials working for other services (speech-to-text), however I am getting problem writing (and reading) to the DB. In addition to having the role as owner, I also gave it 'Firebase Rule System' access. The roles are: Firebase Rules System, Owner . Any

Server-side OAuth for user impersonation via GMail API

一曲冷凌霜 提交于 2019-12-11 10:43:42
问题 I am trying to perform server-side OAuth so I can use a specific user account in my domain to send emails (hence using GMail API) via my application. Mine is a purely server-side app and I cannot perform "user consent" via a UI. I have created a project in Google App Engine and have obtained service account credentials (P12 key). My code looks like this - new GoogleCredential.Builder() .setTransport(httpTransport) .setJsonFactory(JSON_FACTORY) .setServiceAccountId

Google Analytics V3 - How to create custom segments for API Service Accounts

六月ゝ 毕业季﹏ 提交于 2019-12-11 09:42:58
问题 I need to access custom segments in Google Analytics via reporting the API. There is no trouble with it, except that custom segments are not shareable across multiple profiles/users set in Google Analytics, so a segment has to be created for each profile. And in the case of using a Service Account generated through Google API's Console, segments have to be created for that account – how do I log in to Google Analytics with a Service account having Client ID, email address and public key

Google Admin SDK - Service account can't access resource

試著忘記壹切 提交于 2019-12-11 06:08:39
问题 I've created Service Account client via console.developers.google.com. Generated keys, .p12 cert, enabled DwD, and so ... Then I've continued as describer in Admin API references. (HTTP/REST version). That included asingning scopes to these clients id at Google Admin -> Security -> Advancet Settings. Current admin security config state After I succesfully exchanged code for access token and made request for list of users under my domain i got this response. { "error": { "errors": [ { "domain"