500 error when copying a google spreadsheet - ruby

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

Related

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.

YoutubeAPI returns 401 Invalid Credentials error when try to upload video to youtube using Youtube Data API(V3)

I am trying to upload video to Youtube using Angular File Uploader,OAuth and Youtube Data API(v3) in Codeigniter project. But It always fails with 401 Invalid Credentials response. I tried creating a youtube channel as suggested by other answer but it didn't work for me.
This is my POST url structure
https://www.googleapis.com/upload/youtube/v3/videos?client_id={clientID}&access_token={accessToken}&part=snippet&mine=true
Please can someone explain me the procedure for do this successfully I am new to this.
Invalid Credentials means that The access token you're using is either expired or invalid. You should check the full error for more information. It normally looks something like this.
401: Invalid Credentials Invalid authorization header.
{
"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Invalid Credentials",
"locationType": "header",
"location": "Authorization",
}
],
"code": 401,
"message": "Invalid Credentials"
}
}
Videos: list is a public request this means that technically you only need an API key.
https://www.googleapis.com/upload/youtube/v3/videos?key=yourkey
You can use an access_token which was gained from Oauth2 authencation.
https://www.googleapis.com/upload/youtube/v3/videos?access_token=yourtoken
There is no need to add client_id this may be what is causing your problem.

Google people.people.connections.list pagination seems to be broken

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.

403 'serving limit exceeded' but have 'Unlimited requests/second/user'

We utilize the Content API for Shopping to make updates to our product data. We do this several times a day, and have done so for just over 2 months.
We made several successful calls today, but then started receiving the following:
Google API Error Response:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "servingLimitExceeded",
"message": "Serving Limit Exceeded"
}
],
"code": 403,
"message": "Serving Limit Exceeded"
}
}
That lasted about an hour, then we made successful calls for a bit, then started getting errors again.
Checking the Google API Console -both Quota and Reports, we have 'Unlimited requests/second/user' for the all aspects of this API.
Is there an API issue? If we are exceeded a quota, we do not see what that is.

pageSpeedOnline.pagespeedapi().runpagespeed(..) function fails with error 403

I have tried to analyze url page using pageSpeedOnline.pagespeedapi().runpagespeed(..) api but fails with 403 "Forbidden". The api is enabled in the console and the billing is also enabled but I am blocked further since it always fails with 403. The billing was just enabled since a week back.
Below is the response of the curl request,
curl "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=http://code.google.com/speed/page-speed/&key=API_KEY"
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
Please help.
I got it resolved, by creating "Key for browser apps (with referers)" and used that API key in the project.

Resources