google-api

Use Google::Auth::Stores::FileTokenStore with database

旧时模样 提交于 2020-02-24 12:11:05
问题 I'm trying to implement a 3 legged authentication in my app to the Google API, to be able to access registered users' Google Calendars. In the quickstart Ruby guide, this command comes up that as far as I understand should point to the user's tokens: token_store = Google::Auth::Stores::FileTokenStore.new(file: CREDENTIALS_PATH) It expects the tokens stored in a file (or Redis), but (of course) I store each user's tokens in my database (Postgres). Have I understand the purpose of the command

Location of Google Drive Service Account Uploads

雨燕双飞 提交于 2020-02-21 18:27:59
问题 I'm trying to upload a file to my Google Drive using a service account. When I deploy this code, I don't want the user to give authorization, I want them to upload to my account. I'm using this via PHP, and below is where I am so far. This code is based on the examples given by the official documentation. When I run the php script, I get no errors, and I print_r the result variable. It has multiple URLs, when I go to it with the same account I created all this with, it says I need to request

Location of Google Drive Service Account Uploads

两盒软妹~` 提交于 2020-02-21 18:27:23
问题 I'm trying to upload a file to my Google Drive using a service account. When I deploy this code, I don't want the user to give authorization, I want them to upload to my account. I'm using this via PHP, and below is where I am so far. This code is based on the examples given by the official documentation. When I run the php script, I get no errors, and I print_r the result variable. It has multiple URLs, when I go to it with the same account I created all this with, it says I need to request

Google API/get directory contacts

耗尽温柔 提交于 2020-02-21 14:37:40
问题 I need get list of contacts/phones from google buisness directory listing. I have tried Google Contacts api, it work ok for all contacts under "My Contacts", but not allow show "Directory" contacts. What i have use/how to access thoose contacts(company ones)? 回答1: To add users to the Global Address List (GAL), use the Domain Shared Contacts API. It's similar to the regular Contacts API but is only accessible to admins and has a special URL. 回答2: Note that to get all users on an account is now

Google API/get directory contacts

廉价感情. 提交于 2020-02-21 14:35:25
问题 I need get list of contacts/phones from google buisness directory listing. I have tried Google Contacts api, it work ok for all contacts under "My Contacts", but not allow show "Directory" contacts. What i have use/how to access thoose contacts(company ones)? 回答1: To add users to the Global Address List (GAL), use the Domain Shared Contacts API. It's similar to the regular Contacts API but is only accessible to admins and has a special URL. 回答2: Note that to get all users on an account is now

Google API Drive V3 retrieving drive storage space used

*爱你&永不变心* 提交于 2020-02-08 10:05:05
问题 I'm using a google service account to retrieve the usage of data from different users. I'm using google's python client to authenticate and retrieve the data. Code service = build('drive', 'v3', credentials=auth) result = service.about().get(email).execute(); result = result.get("storageQuota", {}) I keep getting the following error: method() takes 1 positional argument but 2 were given I want to be able to get it from a specific user's drive information using the email as an identifier. 回答1:

Updating List of Entity Entries of DialogFlow Agent via API

坚强是说给别人听的谎言 提交于 2020-02-07 02:52:11
问题 Have been looking for a way to programmatically update our agent's entity entries for a certain entity type through the DialogFlow API . The purpose is to automate the updating of our entity entries on a scheduled basis (as our entries will be changing daily). Came across this documentation page by Google on batch updating entity entries but have not been able to get anything better than a 404 when testing. Have tried sending POST's via Postman using the supplied path and inserting my project

Suddenly getting 403 from YouTube data-API

孤人 提交于 2020-02-06 08:17:26
问题 I am suddenly getting a 403 error when sending requests to YouTube's data-API. This is the error I am getting in production for all requests: "error": { "errors": [ { "domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configured. YouTube Data API has not been used in project 944988770273 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=944988770273 then retry. If you enabled

Google API - Oauth 2.0 Auth token flow

情到浓时终转凉″ 提交于 2020-02-06 07:19:44
问题 Context -- I am building a web application that uses the Google Cal and Google+ API. I will need to obtain a refresh token, since once a user authenticates with the site/app, some of the calls happen behind the scenes after they have logged in (and many of them happen after 1 hour, of which the initial access_token is valid for) As I understand it, here is the flow I must follow: Register a Web Application API through Google console - done. Prompt the user to authenticate with my application,

Google API - Oauth 2.0 Auth token flow

纵然是瞬间 提交于 2020-02-06 07:19:21
问题 Context -- I am building a web application that uses the Google Cal and Google+ API. I will need to obtain a refresh token, since once a user authenticates with the site/app, some of the calls happen behind the scenes after they have logged in (and many of them happen after 1 hour, of which the initial access_token is valid for) As I understand it, here is the flow I must follow: Register a Web Application API through Google console - done. Prompt the user to authenticate with my application,