Youtube API 500 错误 [英] 500 Error With Youtube API

查看:28
本文介绍了Youtube API 500 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Youtube Data API V3 编辑我的频道描述,但如果我尝试使用brandingSettings"执行任何操作,则会收到500 Internal Server Error".我什至尝试启动私人浏览会话并使用不同的 Google 帐户.这是 Google 的问题,很快就会修复吗?还是我做错了什么?

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?

对不起,我是新来的.我只是在使用试试看!"developer.google.com 上的内容.

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

请求:

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

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

回复:

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"
}
}

推荐答案

如果您收到 500 错误 等待几分钟,然后重试.如果您仍然收到 500 错误,请尝试等待几个小时或几天.请确保您提供了正确的频道 ID.

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.

在 API 中执行此操作的方法,执行 channel->list 请求并使用该响应对象,对其进行修改并将其放回原处.(最重要的是确保 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 请求

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

注意:此请求需要至少具有以下范围的授权.

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

使用 API Explorer 对实时数据调用此方法并查看 API 请求和响应:https://developers.google.com/youtube/v3/docs/channels/update#try-it

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

这篇关于Youtube API 500 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆