service-accounts

Can the Google Apps Script Execution API be called by a service account?

纵饮孤独 提交于 2019-12-04 02:30:07
I'd like to use a service account to access a Google Sheet via the Apps Script Execution API , but it's not clear from the documentation whether this is supported. The steps I've tried (which result in a 403 status from the Execution API) are: Create a new (unbound) Apps Script Visit the linked Developer Console project Enable the Execution API Create a new service account within the same project (downloading the generated JSON file) Create a new Google Sheet and share it with the service account's email address ( this is the step I'm least sure about ) Write an apps script function that reads

Node: Google Analytics data via service account

半腔热情 提交于 2019-12-03 20:27:12
Update: I've since turned the code into an NPM module . I've worked my way through created a JWT token for a service account , and I can access user data, but I want to get to my analytics data to use it to drive content on my website. Note: I don't know if there is a better way than this, but the the existing npm tools seem to require that you enter your password. As a result I end up using REST calls rather the gapi tools. This is the error I get { error: { errors: [ [Object] ], code: 403, message: 'User does not have any Google Analytics account.' } } Here is the code I am using which is

Allowing Google Service Account YouTube Upload Access via API v3

江枫思渺然 提交于 2019-12-03 17:20:38
问题 I want to automatically upload videos to YouTube without user involvement so I've created a service account, jumped through the hoops, all was looking great, then the upload, chunk one, is attempted and my code bombs with this Google_Exception exception: "Failed to start the resumable upload (HTTP 401: youtube.header, Unauthorized)" I then dug and found on the YouTube API v3 error information: https://developers.google.com/youtube/v3/docs/errors "This error is commonly seen if you try to use

Google Drive API, Oauth and service account

狂风中的少年 提交于 2019-12-03 17:00:28
问题 I've some issues with Google Drive API, service account and authentication. I read a lot, but I cannot figure out how to solve this. Context: I have some files on my Drive account (about 35GB) and a simple web app which let users to log in, see some selected folders/files from my Drive and download them if needed. The only one who can directly access to my Drive account is (or should be) my server, users do their stuff through web app/server. After some search I found server-to-server

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

和自甴很熟 提交于 2019-12-03 16:03:28
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_ACCOUNT_EMAIL) .setServiceAccountScopes("https://www.google.com/m8/feeds")

Service account doesn't show up in Google Play Console after creation

做~自己de王妃 提交于 2019-12-03 06:46:09
问题 From my Google Play console I linked a project. Then I created a service account. Still, when refreshing the console, it still says "There are no service accounts associated with your project." Waited over 24 hours already. The purpose of all that is receipts validation. Picture 1: a linked project: Picture 2: service-account created: 回答1: I had the same problem, I fixed it this way: When you create a service account in step 2, you need to select a role to grant this service account some

Google Drive API, Oauth and service account

那年仲夏 提交于 2019-12-03 06:27:01
I've some issues with Google Drive API, service account and authentication. I read a lot, but I cannot figure out how to solve this. Context: I have some files on my Drive account (about 35GB) and a simple web app which let users to log in, see some selected folders/files from my Drive and download them if needed. The only one who can directly access to my Drive account is (or should be) my server, users do their stuff through web app/server. After some search I found server-to-server authorization docs that should be perfect for my purpose BUT, as I can see, service account does not share

Allowing Google Service Account YouTube Upload Access via API v3

↘锁芯ラ 提交于 2019-12-03 06:20:34
I want to automatically upload videos to YouTube without user involvement so I've created a service account, jumped through the hoops, all was looking great, then the upload, chunk one, is attempted and my code bombs with this Google_Exception exception: "Failed to start the resumable upload (HTTP 401: youtube.header, Unauthorized)" I then dug and found on the YouTube API v3 error information: https://developers.google.com/youtube/v3/docs/errors "This error is commonly seen if you try to use the OAuth 2.0 Service Account flow. YouTube does not support Service Accounts , and if you attempt to

How to login to Google API with Service Account in C# - Invalid Credentials

谁说我不能喝 提交于 2019-12-02 21:17:06
I'm beating myself bloody trying to get a simple service acccount login to work in C#, to Google API and Google Analytics. My company is already getting data into Analytics, and I can query information with their Query Explorer, but getting started in .Net is not going anywhere. I am using a Google-generated json file with PKI, as the documentation says that such a service account is the proper way for computer-to-computer communication with Googla API. Code snipet: public static GoogleCredential _cred; public static string _exePath; static void Main(string[] args) { _exePath = Path

Service account doesn't show up in Google Play Console after creation

坚强是说给别人听的谎言 提交于 2019-12-02 20:25:31
From my Google Play console I linked a project. Then I created a service account. Still, when refreshing the console, it still says "There are no service accounts associated with your project." Waited over 24 hours already. The purpose of all that is receipts validation. Picture 1: a linked project: Picture 2: service-account created: I had the same problem, I fixed it this way: When you create a service account in step 2, you need to select a role to grant this service account some permissions, although it shows the step is optional, but for some cases, it's not. If you skip this step, the