google-api

Invalid JWT when trying to connect to Google Oauth for google API

寵の児 提交于 2019-12-22 08:26:44
问题 I was trying to connect to Google API through OAuth through JWT, but I keep getting this error: { "error": "invalid_grant", "error_description": "Invalid JWT: Token must be a short-lived token and in a reasonable timeframe" } In my JWT calim I set the iat to be current time minus 1970-01-01 in seconds and exp to iat + 3600, so I do not know why I am still getting this error. If anyone knows the answer please tell meeeeee! 回答1: Not sure if you ever got it to work, but the following simple

Can't Validate Google Access Token (wrong number of segments)

倖福魔咒の 提交于 2019-12-22 08:17:54
问题 I have very simple code directly from Google's website $client = new Google_Client(['client_id' => $CLIENT_ID]); $payload = $client->verifyIdToken($id_token); if ($payload) { $userid = $payload['sub']; echo $userid; } else { // Invalid ID token echo "error"; } I get the following error(s): <b>Fatal error</b>: Uncaught exception 'UnexpectedValueException' with message 'Wrong number of segments' in /../vendor/firebase/php-jwt/src/JWT.php:79 Stack trace: #0 /../vendor/google/apiclient/src/Google

PyDrive guath.Refresh() and Refresh Token Issues

放肆的年华 提交于 2019-12-22 08:15:42
问题 Like others, I'm trying to get the Google refresh token to work in order to run scheduled tasks that copy and rename files. When I first manually authenticate within a terminal, my url ends in &access_type=offline. However, when I go in and try to manually use gauth.Refresh() in ipython, it fails with the same error as when my credentials file expires: pydrive.auth.RefreshError: No refresh_token found.Please set access_type of OAuth to offline. How do I actually set access_type to offline?

Cannot update photos with Google People API

巧了我就是萌 提交于 2019-12-22 08:11:54
问题 https://developers.google.com/people/api/rest/v1/people/updateContact Here's the wiki on update contact using People API. The update works for fields like 'emailAddresses'. But 'coverPhotos' or 'photos' are not listed as valid value for 'updatePersonFields' and I get return code 400 if I try to update them. Is changing photos of a contact supported by this API? Or is there any other API that does this job? 回答1: Currently you cannot update photos, there will be support for updating photos

How to get Current GPS location(latitude-longitude) using Google API in Android App?

眉间皱痕 提交于 2019-12-22 08:02:31
问题 I want to get GPS location using Google API. My code: mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); @Override public void onConnected(Bundle bundle) { mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient); double lat = mLocation.getLatitude(); double lon = mLocation

Google Docs/Sheets API Ongoing Outage - Influx of 500 Errors

你离开我真会死。 提交于 2019-12-22 06:56:26
问题 We're experiencing hundreds of thousands of 500 status code responses across the past couple days: We're sorry, a server error occurred. Please wait a bit and try reloading your spreadsheet. Here is a raw request: https://gist.github.com/bryanhelmig/3dba25ec63e82221855b They are almost entirely on GET https://spreadsheets.google.com/feeds/spreadsheets/private/full This started happening across the past 5-7 days It happens across many user accounts - it is not tied to a specific user

Google Api Auth Http Module Error

橙三吉。 提交于 2019-12-22 06:37:58
问题 I'm working on my first app ever to use Google Api for Calendar. I've read the Google examples at: https://developers.google.com/google-apps/calendar/instantiate The first time I ran the program below it was successful. I allowed my app to access my Google account and the application made a calendar.dat file with the auth info in my app-directory. After I renamed the filed the code was in the auth stopped working. I have already deleted the file entirely and recreated it from scratch, but the

Google javascript sign-in api: no offline access

拈花ヽ惹草 提交于 2019-12-22 06:33:07
问题 I'm trying to implement Google Sign-In for server-side apps as shown in Google documentation: Google Sign-In for server-side apps, but the consent window never asks for offline access. After selecting a user it just closes and calls the sign in handler function. As a result, when I get the one time code and send it to the server, I cannot exchange it for a refresh token, only for access and id tokens. Here is my client code: In the HTML file: <script src="https://apis.google.com/js/platform

Invalid Credentials for OAUTH from Youtube API

…衆ロ難τιáo~ 提交于 2019-12-22 05:53:28
问题 I am getting 401 Invalid Credentials error trying to use the Youtube API in the OAuth 2.0 Playground. Response is: { "error": { "code": 401, "message": "Invalid Credentials", "errors": [ { "locationType": "header", "domain": "global", "message": "Invalid Credentials", "reason": "authError", "location": "Authorization" } ] } } Steps can be reproduced here. Select Manage Youtube account API Authorize Get access token Attempt to call any Youtube API (you may need to plug your own API key in as

How to hint Google Smart Lock to use a specific input field as the username in a website

北城余情 提交于 2019-12-22 05:49:09
问题 I've been trying to search for some documentation on how to hint Google Smart Lock for Chrome to use a specific input field as the one associated with the username without any luck. For the password it works perfectly as it is using type="password" but when it comes down to the username in a multi field form, where the username is not specified before the password or not as the first field in the form it picks another of the fields in the form as the username. Does anyone have any clue on how