HttpError 500 when requesting https://www.googleapis.com/youtube/v3/playlists?part=snippet%2Cstatus&alt=json returned "Internal error encountered." - google-apis-explorer

Getting 500 error when making a https://www.googleapis.com/youtube/v3/playlists request.
I'm using the python implementation provided here:
https://developers.google.com/youtube/v3/docs/playlists/insert.
The same request worked yesterday, so I tend to believe this is not on my side.
Is there anything I might be missing?

The message error usually is more descriptive than the one you put. I had the same problem than you (same message and just yesterday) and tryed a direct call to YouTube API via this page: (you will see a try it pane in the right where you can easily put the call parameters): https://developers.google.com/youtube/v3/docs/playlists/insert
After executing it, I cuolud find the complete error message that was:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"errors": [
{
"domain": "youtube.api.v3.PlaylistInsertResponse.Error",
"reason": "RATE_LIMIT_EXCEEDED"
}
],
"status": "INTERNAL"
}
}
Probably calling the API in that way will give you the full detailed reason of the error.

Related

Not Able to fetch assignment "Blackboard"

How to fetch assignment from course? I am using below API for getting content.
But I am getting this:-
{
"status": 404,
"message": "API is not found for the specified URL."
}
https://apporto-test.blackboard.com/learn/api/public/v1/courses/{courseId}/contents

Cannot get analytics for google url shortener on some of my links

I've got several links by google shortener and I am unable to access the analytics for one of them.
When I click on the first two analytics links it shows a 200 http status and the analytics show but with the last one there's a 500 error in my firefox console and the message Short URL goo.gl/6PL9Fx not found appears in a little message box.
Same thing with the Google URL Shortener api reference. Whenever I try this api it gives me this as a response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}
These are my links:
goo.gl/SBGshX
goo.gl/ExkDyv
goo.gl/6PL9Fx
I actually have more links than just these and there's another broken one but I didn't want to overload the question.

Why are attempts to view revisions with the Google Drive API returning a 500?

I've been working with the Google Drive API for a bit, accessing the list of revisions for two sheets as part of a job with service.revisions().list(fileId=FILE_ID).execute(). Everything was fine until earlier this morning, when one of the requests (but not the other) started returning a 500 error. This isn't intermittent - it's returning this error on every request so an exponential backoff just hits the cap I've set (5).
There's nothing of value in the response but here it is:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "internalError",
"message": "Internal Error"
}
],
"code": 500,
"message": "Internal Error"
}
}
I get the same error when querying with the API explorer, so this seems to be an issue with the sheet itself as opposed to a coding problem. Here's the request URL:
https://www.googleapis.com/drive/v3/files/1KYDm4gqaCLipQTskbqQbesq8ON7CmV_4IscF8V0FZrs/revisions?key=YOUR_API_KEY
What could suddenly cause this change in behavior?

Google Search Console 401 Bad Request issue without using Client Library

So, Here are 3 steps.
I called oAuth2 with following url:
https://accounts.google.com/o/oauth2/v2/auth
?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters.readonly
&client_id=___.apps.googleusercontent.com
&redirect_uri=urn:ietf:wg:oauth:2.0:oob
&response_type=code
&approval_prompt=force
&access_type=offline
I get the code, suppose: 4/QVgPaCMqp94____qBC4NY_d54IcRj7U9mJc
Then I'm making a request for access_token, by making a POST request to https://accounts.google.com/o/oauth2/token with client_id, client_secret, redirect_uri, grant_type, and I get a JSON like:
'access_token' => ya29.CjHzAgC4js6Guv-1pt_rE____q8XIxiXOXOaSZW9NLRjKCTI3izBi,
'expires_in' => 3600,
'refresh_token' => 1/dL3ENA-EVI0rEb6D-OGqw_____iFe2ZNdEq4,
Now, I am making a request with that access_token or in cases of expiry with a renewed access_token to Google Search Console, which I have added in scopes.
My request is similar to this: https://developers.google.com/webmaster-tools/v3/urlcrawlerrorssamples/list#try-it
But I get an 401 unauthorized error, with a json like following:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
Considering I have done the process correctly, I think I have missing some parameters or providing some wrong value.
I have not used Google Client Library, instead used the REST API framework directly.
Can anybody give some clue please? Thank you.
The reason is, URL query parameter must be ?access_token= and not ?key= The later can be used only in case of direct API access and not oAuth.

403 error when making an SQL query for a Fusion Table

I've been trying to migrate my project to new API, but I get the following error when trying out an SQL query such as the following:
https://www.googleapis.com/fusiontables/v1/query?sql=SELECT * FROM 1KxVV0wQXhxhMScSDuqr-0Ebf0YEt4m4xzVplKd4&key=myKey
Here is what gets returned:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured"
}
],
"code": 403,
"message": "Access Not Configured"
}
}
The following query does work, though:
https://www.googleapis.com/fusiontables/v1/tables/1bTX-w0Lt6nT8jq4R0q2pwFvuN_X5iPDOKHWFhw/columns?key=myKey
What am I doing wrong?
You also need to make sure the Fusion Table is Exportable.
File → About this table
→ Edit table information
→ Check the "Allow download" checkbox
I started a new project in the API console and using the new API key fixed it, strangely.