YouTube video upload using PHP Data API v3 recently stopped working - youtube-api

We developed a video upload to YouTube several years ago (2013) that stopped working with a misleading error message, since the quota is not the issue, see error message:
{
"error": {
"code": 403,
"message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
"errors": [
{
"message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
"domain": "youtube.quota",
"reason": "quotaExceeded"
}
]
}
}
Could it be that the permissions to upload videos (insert) are not working anymore for the same Google account due to the changes Google/YouTube made in 2020?
I am stuck and hope someone can tell me what the issue might be and how to fix it.
Thanks!

Related

livePermissionBlocked error from Youtube liveBroadcast/insert API

When attempting to call the liveBroadcasts/insert API I receive a livePermissionBlocked error. I have two google cloud projects, and both have been verified to be able to use auth/youtube scope. In one project with the same google user I can call that api without any issue. In the other project using the same user I receive livePermissionBlocked error. How can I investigate further why that API fails in one of the google cloud projects?
See below the full error response
{
"error": {
"code": 403,
"message": "The user is blocked from live streaming.",
"errors": [
{
"message": "The user is blocked from live streaming.",
"domain": "youtube.liveBroadcast",
"reason": "livePermissionBlocked",
"extendedHelp": "https://support.google.com/youtube/answer/2853834"
}
]
}
}
Also please note I have verified that the user I am testing with has Youtube streaming enabled. I am able to live stream on Youtube and also using one of my google cloud projects.

How to resolve Youtube Data API errors

Currently our Youtube data API v3 is enabled.
However, we found there was some error while we calling this API.
The screen shows as the following:
Google_Service_Exception : {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. YouTube Data API has not been used in project 10xxxxxxxxx29 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=10xxxxxxxxx29 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=10xxxxxxxxx29"
}
],
"code": 403,
"message": "Access Not Configured. YouTube Data API has not been used in project 10xxxxxxxxx29 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=10xxxxxxxxx29 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
}
We try to create a new O Auth 2.0 ID, but the issue was still got same error.
Is there any way to resolve this problem?
Thanks
Google allows for 50000 request per month/per user.So seem your website has high traffic.You can get another API key from your other gmail then put into API settings.Hope this help.

Internal server error from YouTube Analytics API

since yesterday we are receiving code 500 errors from the YouTube Analytics API. Nothing has changed in the relevant code since a few months ago, and everything always went smoothly before yesterday.
This is a sample query (but ALL queries to YT Analytics fail):
https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3D<channelid>&metrics=views,averageViewDuration,estimatedMinutesWatched,comments,likes,dislikes,shares,subscribersGained,subscribersLost&dimensions=channel&start-date=2016-06-01&end-date=2016-06-30&start-index=1
(with appropriate channelId and Authorization header set). This is what we are getting back:
{
"code": 500,
"message": "The remote server returned an error: (500) Internal Server Error.",
"response": {
"error": {
"errors": [{
"domain": "global",
"reason": "internalError",
"message": "Unknown error occurred on the server."
}
],
"code": 500,
"message": "Unknown error occurred on the server."
}
}
}
Any clues?
I got the same problem : "Error 500" for any youtube API called (yt-analytics.readonly).
Here is a workaround for fixing the problem :
Add the following right on your application https://www.googleapis.com/auth/youtube.readonly, even if it's not usefull
re-generate the refresh token
everything is fixed
You can even remove the application and add it again wihtout the youtube.readonly right, it's still working. It's like the API got an update by adding this unusefull right.
I have also tested another workaround with the API Test Console, by adding "Google APIs Explorer" application with the youtube.readonly & yt-analytics.readonly unblock the problem and you dont have any "Error 500" with your own token.
Hope this helps and it's clear enought !
It seems it mostly fixed this problem.
I think the problem is on YouTube side.
We are still waiting until they fix 100%.

google youtube data api v3 youtube.videos.insert 503 error

youtube.videos.insert 503 error
yesterday I could upload video files.
but today I cannot upload video files via google api v3
Uploading file...
A retriable HTTP error 503 occurred:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 503,
"message": "Backend Error"
}
}
503 means there was a transient error in YouTube server backend. Now it's working for me. Please try again.
Sorry not really answering your question but it seems the '503' backend error is around at the moment. I'm having the same issue testing my iOS app using v3 objective-c YouTube API - I hit the same 503 error all the time, only 2-3 uploads out of 20 go through. Even the Google OS X sample app fails constantly. Definetely something in the backend... I've reported a bug to YouTube API a week ago.

503 Service Unavailable when threading?

I get some information via Youtube API V3 with 5 simultaneous thread and just after the launch I have some "503 Service Unavailable" response. When I re-launch the same video it can be ok or not... So it seems there is no problem on my side.
My quota is ok (30k per seconde...)
So what is the problem??
Thanks
I'm using just list video API, for example:
$ time curl --silent "https://www.googleapis.com/youtube/v3/videos?id=AX7Z5eqosxM&part=id%2Csnippet%2CcontentDetails%2Cplayer%2Cstatistics%2Cstatus%2CtopicDetails&key={MY_API_KEY}"
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 503,
"message": "Backend Error"
}
}
real 0m30.692s
user 0m0.024s
sys 0m0.024s
I don't think you're doing anything wrong—there's nothing inherent in v3 that should prevent a large volume of those calls form succeeding, as long as you're within normal quota limits.
I've seen some other reports of this as well with videos.list() calls, so I've created https://code.google.com/p/gdata-issues/issues/detail?id=4020 to keep track of the issue publicly.
Google develop has a Error Responses page to explain different error codes
https://developers.google.com/analytics/devguides/reporting/core/v3/coreErrors
In this page, they also provide some implementation Exponential Backoff, that might be helpful for you. But I agree with Jeff that there is nothing more we can do but waiting.

Resources