google-oauth

Google calendar v3 Push notification expiry

99封情书 提交于 2019-12-30 05:26:25
问题 I am using Google Calendar Push Notifications. All is working well and I register my channel with no issue. Changes to the calendar result in a notification as expected. The issue is however that after an hour or so the notifications expire. In reading the documentation I cannot work out why there is an expiry given that I am not specifying one. When the channel is registered the response actually states an expiry date of 1 week from when I register the channel - e.g. Fri, 31 Jan 2014 03:23

Get user name, avatar from google account

江枫思渺然 提交于 2019-12-30 05:02:41
问题 I'm developing an module that use GoogleAccountCredential to login, upload & download a file to GoogleDrive. I want to get user first, last name and avatar of google account for display on my login feature. I've try GoogleAccountCredential.getAccountName() But It return only account name. And see about OAuth 2.0 but not sure It can provide which I needed. Don't know where to get those infomation, any suggestion also help me. It's awsome if have some examples 回答1: ianhanniballake's answer

Google OAuth 2 authorization - swapping code for token

ⅰ亾dé卋堺 提交于 2019-12-30 04:47:11
问题 I'm trying to implement Google OAuth 2 to get access to Google APIs. I follow this guide, using server-side scenario. I have no problem with getting the code, server redirects to localhost (which is the only server allowed in redirect URIs for now). To achieve this, I go to https://accounts.google.com/o/oauth2/auth?client_id=whatever.apps.googleusercontent.com&redirect_uri=http://localhost/&scope=https://www.google.com/m8/feeds/&response_type=code page. Then, I tried using curl (as in guide)

Google OAuth 2.0 refresh token for web application with public access

梦想的初衷 提交于 2019-12-30 03:23:05
问题 I'm getting the following error: The OAuth 2.0 access token has expired, and a refresh token is not available. Refresh tokens are not returned for responses that were auto-approved I have a web application which only my server will be accessing, the initial auth works fine, but after an hour, the aforementioned error message pops up. My script looks like this: require_once 'Google/Client.php'; require_once 'Google/Service/Analytics.php'; session_start(); $client = new Google_Client(); $client

accountmanager refresh token(offline access)

纵然是瞬间 提交于 2019-12-30 02:24:08
问题 I use google login through account manager in my android app. I can get accesstoken which I send to server and server can create/login new user. Accesstoken is valid only 3600seconds. Problem is that server can not update user's info after this time expires. Web app requires check user's info periodically. How can I get authentication token and refresh token from android account manager so than server can use refresh token to update data periodically? I don't want use login through webview in

Issue with OAuth2 authentication with google spreadsheet

…衆ロ難τιáo~ 提交于 2019-12-28 06:50:08
问题 I am using java library for oauth2 authentication for accessing google spreadsheet. I am using below code for OAuth2 authentication: credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(SERVICE_ACCOUNT_EMAIL) .setTokenServerEncodedUrl("https://accounts.google.com/o/oauth2/token") .setServiceAccountScopes("https://www.googleapis.com/auth/drive", "https://spreadsheets.google.com/feeds", "https://docs.google.com/feeds")

Implementing Oauth2 login, Fatal error: Class 'Google_Service' not found

谁说胖子不能爱 提交于 2019-12-28 06:13:49
问题 I am updating my website's login system from LightOpenID to Google's Oauth 2.0. When I require the Client.php and the Service/Oauth2.php I get an error Fatal error: Class 'Google_Service' not found in /home/myname/repos/website_current/lib/google-api-php-client/src/Google/Service/Oauth2.php on line 32 The code I am using (from my login.php file) looks like this require_once(dirname($_SERVER['DOCUMENT_ROOT']).'/lib/autoload.php'); require('Google/Client.php'); require('Google/Service/Oauth2

Basic Google Sign-In for Websites code not working in Internet Explorer 11

不问归期 提交于 2019-12-28 05:22:11
问题 I am attempting to use Google Sign-In for Websites (https://developers.google.com/identity/sign-in/web/) and noticed that my solution is not working in Internet Explorer 11. To try to eliminate as many factors as possible, I created a simple test case based on the sample code provided by Google. I've tested it in Chrome on my Windows 7 PC, Chrome on my Mac, Safari on my Mac, Firefox on my Mac and Safari on my iPhone. It works on all of these (e.g., when I click the sign in button and select

Google.GData.Client.GDataRequestException - Authentication suddenly fails in old code

梦想与她 提交于 2019-12-28 04:13:31
问题 I'm suddenly starting to get the following exception when attempting to authenticate and access a spreadsheet on Google drive: Unhandled Exception: Google.GData.Client.GDataRequestException: Execution of aut hentication request returned unexpected result: 404 at Google.GData.Client.Utilities.getAuthException(TokenCollection tokens, Htt pWebResponse response) at Google.GData.Client.Utilities.QueryClientLoginToken(GDataCredentials gc, S tring serviceName, String applicationName, Boolean

Why is Google Calendar API (oauth2) responding with 'Insufficient Permission'?

元气小坏坏 提交于 2019-12-28 03:01:28
问题 I'm doing a get request to the following URL (with {id} replaced with the id from the web interface): https://www.googleapis.com/calendar/v3/calendars/{id} A few assertions: The Authorize header is being correctly set with a valid access token (the token works fine for the Analytics API) I've set the following scope for oauth2, which shows up correctly: https://www.googleapis.com/auth/calendar The token doesn't appear to have expired; it works for the Analytics API. { "error": { "errors": [ {