google-oauth2

Access Google spreadsheet from Google Appengine with service account : working once per hour

柔情痞子 提交于 2020-01-01 19:13:11
问题 I have implemented the python code here below based on the documentation in order to access a spreadsheet accessible through a public link. It works once every hour. If I execute a few seconds after a success, I receive an error : Error opening spreadsheet no element found: line 1, column 0 Assumption: The access token has an expiry date of 1 hour. So the appengine would proceed to a token refresh after an hour, resetting the whole. Question: This code requests a new token for each request.

Google Sign-In gives error when swiching to secondary Youtube accounts

你离开我真会死。 提交于 2020-01-01 08:04:30
问题 I am currently trying to use gapi.auth2 from Google Sign-In for Websites API and this is the code I have: -- load the library with: <script src="https://apis.google.com/js/platform.js?onload=onLoadGapiCallback" async defer></script> -- initialize an auth2 variable: var auth2; window.onLoadGapiCallback = () => { gapi.load('auth2', () => { auth2 = gapi.auth2.init({ 'client_id': 'CLIENT_ID', 'scope': 'profile email https://www.googleapis.com/auth/youtube.readonly' }); }); }; -- and when a botton

Google Sign-In gives error when swiching to secondary Youtube accounts

一个人想着一个人 提交于 2020-01-01 08:04:04
问题 I am currently trying to use gapi.auth2 from Google Sign-In for Websites API and this is the code I have: -- load the library with: <script src="https://apis.google.com/js/platform.js?onload=onLoadGapiCallback" async defer></script> -- initialize an auth2 variable: var auth2; window.onLoadGapiCallback = () => { gapi.load('auth2', () => { auth2 = gapi.auth2.init({ 'client_id': 'CLIENT_ID', 'scope': 'profile email https://www.googleapis.com/auth/youtube.readonly' }); }); }; -- and when a botton

“Integrate with Google” button suddenly disappeared (receiving 404)

喜夏-厌秋 提交于 2019-12-31 17:10:24
问题 I have Google-Apps-Marketplace app in which I'm using "Integrate with Google" button to start the google OAuth2 process. For some unknown reason the button disappear today, and I'm receiving the error 404 - https://apis.google.com/marketplace/button Does anybody know if it's a temporary issue in google API, or something had changed and I need to update my app? I saw similar questions regarding the disappearance of the button from 4 years ago, however they refer there to access problems (error

Use a .p12 File from classpath for GoogleCredential

梦想的初衷 提交于 2019-12-31 01:23:29
问题 I am making a java command line application packaged in a single JAR file that uses some of Google's API. I need to set up a GoogleCredential object from a private key "Credentials.p12". GoogleCredential credential = new GoogleCredential.Builder() .setTransport(httpTransport) .setJsonFactory(jsonFactory) .setServiceAccountId("xxxxx@developer.gserviceaccount.com") .setServiceAccountScopes(Arrays.asList(DirectoryScopes.ADMIN_DIRECTORY_GROUP, DirectoryScopes.ADMIN_DIRECTORY_USER, DirectoryScopes

Accessing G Suite Admin SDK using service account

允我心安 提交于 2019-12-30 10:54:47
问题 I am trying to use a service account to access Directory API (https://developers.google.com/admin-sdk/directory/v1/reference/users/list). The simplest task is to list users in the organization. That works well with my user account, tested with the OAuth 2.0 Playgorund. But I need to use service account. I am following documentation for two-legged OAuth (https://developers.google.com/identity/protocols/OAuth2ServiceAccount) and implementing REST client in Powershell API Access enabled in

How to force account login for a single account user with Google's OAuth 2.0?

佐手、 提交于 2019-12-30 09:44:32
问题 Sometimes when a user logins into a site with Google's OAuth 2.0 they choose the wrong account to login with. Normally this isn't a problem if the user has more than one account registered with the browser, google will automatically show the user select screen: But if a user has only one account and is logged in, this screen is skipped. Instead I need Google's sign in panel to always appear, so that I can be sure the user has the option to try and enter the correct account. I tried using

How to force account login for a single account user with Google's OAuth 2.0?

余生长醉 提交于 2019-12-30 09:44:12
问题 Sometimes when a user logins into a site with Google's OAuth 2.0 they choose the wrong account to login with. Normally this isn't a problem if the user has more than one account registered with the browser, google will automatically show the user select screen: But if a user has only one account and is logged in, this screen is skipped. Instead I need Google's sign in panel to always appear, so that I can be sure the user has the option to try and enter the correct account. I tried using

Is it possible to get profile information in an id_token from Google?

﹥>﹥吖頭↗ 提交于 2019-12-30 03:57:05
问题 When using Google's OpenIDConnect authentication system, it's possible to specify email or profile or both in the scope parameter. If you request the email scope, the "email" and "email_verified" claims will be included in the id_token that gets returned as part of a successful OAuth2 authentication session. Here's an example from Google's documentation: An ID token's payload An ID token is a JSON object containing a set of name/value pairs. Here’s an example, formatted for readability: {"iss

Unable to refresh access token : response is “unauthorized_client”

我的未来我决定 提交于 2019-12-25 07:48:41
问题 First of all, I've read the other questions with similar subjects that I've seen on SO. The solutions there tend to be issues around using credentials copied from elsewhere, so I don't think they apply. I'm working on a PHP web app that syncs data to a Google Calendar. The OAuth flow works perfectly to start with - I obtain a token, exchange it for an access token, and can call APIs successfully. I store the access token, which includes the refresh token as a subkey, for future reference.