google-api

Google form file upload: get filename instead of link to file

会有一股神秘感。 提交于 2020-01-24 20:12:26
问题 I have a simple google form which has a file upload option. The uploaded files are saved in my drive folder. I then have a simple script which executes on form submit to save the form values (upload filename, name and email) to a text file. Here's my app script to do that: function onSubmit(e) { var file = e.values[1]; // getting the link instead of the filename var name = e.values[2]; var email = e.values[3]; var folderId = "0B6de05UZOb0y1ck4tV3BPWldpMU14SGZncnlHa0tzTXVoZFk"; var folder =

Google account ID by account email

血红的双手。 提交于 2020-01-24 19:46:36
问题 I'm writing an application for limited amount of users and logging to app is designed only via google accounts. Now I need to add functionality of adding permissions of accessing app based on email address. Problem is, on the database level, verification of permission to access app is based on Google ID. Since Google ID is more of less not a secret information, is there a way how to get Google ID of account based on email address, without actually logging in with this account? 来源: https:/

G Suite Marketplace SDK change visibility from My Domain to Public?

匆匆过客 提交于 2020-01-24 15:40:34
问题 I've enabled a G Suite Marketplace SDK but initially I set the Visibility to "My Domain" so I could test in isolation on my domain. Now I want to set it to Public but that setting is disabled. Warning: Once you select and save a visibility setting, you cannot change it later. (https://developers.google.com/gsuite/marketplace/sdk) However I can't even disable/delete that API configuration and recreate it, so I can set it to public. Is there any way to change this GSuite Marketplace API

PHP Google Sheets API - Permission Denied

爷,独闯天下 提交于 2020-01-24 12:38:08
问题 Hi I've just started to study PHP and I'm attempting to use the Google sheets API. I thought I followed their instructions and I could call and edit sheet data well but only Public Access. When I change access status as private or Group, I encounter message below. PHP Fatal error: Uncaught exception 'Google_Service_Exception' with message '{ "error": { "code": 403, "message": "The caller does not have permission", "errors": [ { "message": "The caller does not have permission", "domain":

YouTube API subscription insert always returns an error

China☆狼群 提交于 2020-01-24 12:08:09
问题 How to Add a subscription for the authenticated user's channel https://www.googleapis.com/youtube/v3/subscriptions?part=snippet&key={YOUR_API_KEY} Request Parameters :- { "0": { "name": " <code>snippet.resourceId.kind</code>", "value": "youtube#channel" }, "1": { "name": " <code>snippet.resourceId.channelId</code>", "value": "UC_x5XG1OV2P6uZZ5FSM9Ttw" } } Response Parameters :- { "error": { "errors": [ { "domain": "youtube.subscription", "reason": "publisherRequired", "message": "The

Correct date formatting for a Google Calendar Event

烈酒焚心 提交于 2020-01-24 09:44:05
问题 I'm trying to create an event for Google Calendar and I'm getting this error : Invalid value for: "T" found, can only parse bare date string: 2013-08-22T16:00:00 I also tried adding the timezone offset to my string but I set the timezone manually in the EventDateTime object and according to the documentation it's not neccesary. Here is how I create my time string : data['start'] = $("#inputDateStart").val() + "T" + $("#inputTimeStart").val(); And how I set this string in my object $start =

How to uniquely identity a Person resource in Google People API response from a particular user?

只愿长相守 提交于 2020-01-24 09:07:05
问题 Google People API , unlike Google Plus API doesn't provide an unique id for each Person resource in the response. Why has this been deprecated/removed and how to uniquely identify a Person in an user's contacts list without an id ? 回答1: In short, use resourceName as an ID. The Google People API is the user's list of contacts and have IDs specific to the user. They can create contacts that only have a mailing address or only have a name and no contact info. There is no way for Google to

not receiving “Refresh Token” even in the first consent - Google API

落花浮王杯 提交于 2020-01-24 01:37:28
问题 I'm being redirected to the Google Consent for the first time and asked if I allow this application to manage Gmail account and stuff. And when I'm redirected back, refresh token is null. +token:"ya29.Gls1BTQIRIuCW2dnzIpQlciOZNpidhjfsoidjfsomethingsm" +refreshToken: null +expiresIn: 3600 I know Refresh Token comes null on subsequent requests. But this was the first request I made. Is there something I need to do on the console side. 回答1: Solved it. I forgot to set access_type to offline

Google sheets API minimal example

风格不统一 提交于 2020-01-24 01:05:09
问题 I am using the google-spreadsheet npm package to fetch data from the first 2 tabs of a Google Sheet which has been shared with a service account. Since this is a simple task, I would like to remove the dependency on a third party package and use Google's libraries directly. However, there are many different Google libraries and I am not sure what to use. Below is the google-spreadsheet based code I am currently using. How can I convert this to directly use Google libraries? var