Google people.people.connections.list pagination seems to be broken - google-api

When I submit a request using the nextPage token to paginate through lists larger than 500, i get the following error:
500 HTTP/2.0 500
- Show headers -
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
Fiddling with the token gives appropriate detailed error on a bad token.

thanks for reporting the issue. We've identified a bug in one of the backend services when sync is requested and pagination is done on the first sync request without passing in the sync token. We have submitted a fix, which should be rolled out shortly.

Related

Google calendar api get error like "domain": "global", "reason": "notFound", "message": "Not Found"

I tried get list of event from calendar example from here.
No matter which property I
use, I always get the 404 "not found" error. Anyone can shed some light on this? Many thanks.
Request.
POST https://www.googleapis.com/calendar/v3/calendars/oneclapp.2021#gmail.com/events?
key=AIzaSyCGRPF0wSSBLndqdUftlbsDH9emHD_S-qg
Accept: "application/json"
Authorization: Bearer ya29.a0ARrdaM9PPHndl040qaXFmoSFGT9yRPWZs_yrTnYLAHQ0GF-UBvGc67S2L1m0O5OFIilq8oVGRuvw29NFwomtmUTBeHoABcIlaVD_p--4NVlBWCcXLBgfDjsF_5tvt4XRShd1itpe_9CULan9x6BV4TOyP__TkQ
Response
Response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "not Found",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
First off events.list is not HTTP Post its a HTTP GET
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events
Second assuming that you just miss wrote post and you are actually doing a http get.
Not found means just that the currently authenticated user does not have access to the calendar that you are trying to request events for. in this case oneclapp.2021#gmail.com
I recommend using primary to test that you can get the currently authenticated users primary calendar.
GET https://www.googleapis.com/calendar/v3/calendars/primary/events
It looks like you have not configured the OAuth 2.0 Client IDs correctly. We need to configure the OAuth client ID correctly and its type should be 'Web Application'. I was also getting the same error messages, but once I configured the OAuth ID, then it started working.
OAuth id type: Web Application
Permission scopes : https://www.googleapis.com/auth/calendar.readonly, https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.events.readonly, https://www.googleapis.com/auth/calendar.events
Authorized redirect URIs: http://localhost
Here is the screenshot of the Google Calendar API project settings.

Is anyone else getting "Service temporarily unavailable." from Google Books API?

{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendFailed",
"message": "Service temporarily unavailable.",
"locationType": "other",
"location": "backend_flow"
}
],
"code": 503,
"message": "Service temporarily unavailable."
}
}
Started to get this error several hours ago in response to Google Books API: Volume: list
For example, copy-paste the following line into the URL box of your internet browser:
https://www.googleapis.com/books/v1/volumes?q=orwell
It may be useful to refer to the definition of a 503 response code for insight into what to expect.
503 Service Unavailable
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.
Note: In my experiment the endpoint mentioned did not provide any Retry-After header.
What to do...
"If I'm not back in 5 minutes, just wait longer." — Ace Ventura, Pet Detective.

Google API - Google Play Services - Error 500 Message:Null

Request URL:
https://content.googleapis.com/games/v1/players/[CORRECT_PLAYER_ID]?access_token=[CORRECT_APPLICATION_ACCESS_TOKEN]
The application is Server and set up like here:
https://developers.google.com/identity/protocols/OAuth2ServiceAccount
The only response is:
{
"error": {
"code": 500,
"message": null
}
}
In API Explorer I have:
...
"code": 401,
"message": "User has not completed registration."
...
What is wrong with my use case? How I can workaround Verification of Google Play Services User ID?
A 500 response is a server-side error, which sounds more like a bug than a question. It looks like they have a place to report bugs here.
I think this might not execute through the APIs Explorer this way because you haven't registered your project with the credentials being used; it doesn't currently have a way to use your own credentials instead.

500 error when copying a google spreadsheet

I'm trying to copy a google spreadsheet using the google_drive gem. This has been working for many months before.
However, I'm now getting the following error consistently:
Sending HTTP post https://www.googleapis.com/drive/v3/files/$fileid/copy?fields=%2A
{
"error": {
"errors": [
{
"domain": "global",
"reason": "responsePreparationFailure",
"message": "The operation was successful, but there was an error preparing the response."
}
],
"code": 500,
"message": "The operation was successful, but there was an error preparing the response."
}
}
I've tried updating the library, but with no joy. The docs for the endpoint don't mention this fields parameter. Could this be the issue?
500 is a Google server issue. Your best with these is to wait a few minutes and try again. you can also check their server status page to make sure there is nothing down
https://www.google.com/appsstatus#hl=da&v=status

Google Calendar API : "Backend Error" code 503

When I use the Google calendar API to create a new Calendar, I randomly get "Backend Error". Do you have any idea why ? Have you experienced the same behavior ?
First request :
POST https://www.googleapis.com/calendar/v3/calendars Authorization:
Bearer ya29.UQEd-xxx
Content-Type: application/json; charset=utf-8
{"summary":"My new calendar name"}
Google answer (around 20 seconds later):
{ "error": { "errors": [ { "domain": "global", "reason":
"backendError", "message": "Backend Error" } ] "code": 503, "message":
"Backend Error" } }
The calendar is not created
Another request :
POST https://www.googleapis.com/calendar/v3/calendars Authorization:
Bearer ya29.UQEd-yyy
Content-Type: application/json; charset=utf-8
{"summary":"My new calendar name"}
Google answer (around 5 seconds later) : 200
The calendar is created
503 Service Unavailable
The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
503 is a standard HTTP error that happens sometimes. Google ops probably has a graph somewhere showing the frequency of the errors and depending on their priorities may be working to fix it. You should catch the error and either give a human the chance to retry or implement exponential backoff.
Google Apps Calendar Resource API Limits and Quotas
For all errors that are time based (maximum of N things for N seconds per thread), especially the 503 status code errors, we recommend your code catch the exception and, using an exponential backoff algorithm, wait for a small delay before retrying the failed call.
https://twitter.com/googlecalendar/with_replies
Yes google calendar services are currently unavailable. Confirmed from twitter.
For people visiting this in the future, I think that a 503 error can also be thrown when there are an insane number of events and Google Calendar simply chokes on them. I had a event that somehow got duplicated 18k times on a single day and event trying to use events.list with a maxResults of 1 resulted in a 503 error.

Resources