500 Error With Youtube API

2020-03-31 10:20发布

I am trying to edit my channel description using the Youtube Data API V3, but I get a "500 Internal Server Error" if I try to do anything with "brandingSettings". I even tried starting a private browsing session and using a different Google account. Is this a Google issue that will be fixed soon? Or am I doing something wrong?

EDIT: Sorry, I am new. I am just using the "Try It!" thing on developers.google.com.

Request:

PUT https://www.googleapis.com/youtube/v3/channels?part=brandingSettings&key={API_KEY}

{
"brandingSettings": {
"channel": {
"description": "testing"
}
}
}

Response:

500 Internal Server Error

Cache-Control:  private, max-age=0
Content-Encoding:  gzip
Content-Type:  application/json; charset=UTF-8
Date:  Tue, 31 May 2016 20:29:18 GMT
Expires:  Tue, 31 May 2016 20:29:18 GMT
Server:  GSE
Transfer-Encoding:  chunked
Vary:  Origin, X-Origin

{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}

1条回答
祖国的老花朵
2楼-- · 2020-03-31 10:49

If you get a 500 Error wait some minutes and try again. If you still get a 500 Error try and wait some hours or some days. Please make sure that you are giving the right channel id.

The way to do it in API, do a channels->list request and use that response object, modify it and put it back. (Most important make sure the id is there and set.)

HTTP request

PUT https://www.googleapis.com/youtube/v3/channels

Note: This request requires authorization with at least on of the following scopes.

Use the API Explorer to call this method on live data and see the API request and response: https://developers.google.com/youtube/v3/docs/channels/update#try-it

查看更多
登录 后发表回答