品牌设置错误youtube api
我必须使用youtube api更新我频道的特色视频 当我使用表单的api资源管理器发送PUT请求时品牌设置错误youtube api,youtube,youtube-api,Youtube,Youtube Api,我必须使用youtube api更新我频道的特色视频 当我使用表单的api资源管理器发送PUT请求时 PUT https://www.googleapis.com/youtube/v3/channels?part=brandingSettings&key={YOUR_API_KEY} { "brandingSettings": { "channel": { "featuredChannelsTitle": "featured channel
PUT https://www.googleapis.com/youtube/v3/channels?part=brandingSettings&key={YOUR_API_KEY}
{
"brandingSettings": {
"channel": {
"featuredChannelsTitle": "featured channel",
"featuredChannelsUrls": [
"http://www.youtube.com/user/channelname"
]
}
},
"id": "channelId"
}
我得到的答复如下
404 Not Found
- Show headers -
{
"error": {
"errors": [
{
"domain": "youtube.channel",
"reason": "channelNotFound",
"message": "Channel branding options not found.",
"locationType": "parameter",
"location": "id"
}
],
"code": 404,
"message": "Channel branding options not found."
}
}
请告诉我哪里出了问题
我给出了错误的频道ID。但是现在我尝试使用正确的频道ID,并且我收到了另一条错误消息
Content-Type: application/json
Authorization: Bearer ya29.1.AADtN_X2UP_3BfFvUwAkvLp0d0mk1U-itJNVtWMPEJQU8G7INQ5q-UpI1yNMYniiLQ
X-JavaScript-User-Agent: Google APIs Explorer
{
"id": channelId,
"brandingSettings": {
"channel": {
"featuredChannelsUrls": [
" http://www.youtube.com/user/USERNAME"
],
"featuredChannelsTitle": "Featured Channels"
}
}
}
响应是400个错误请求
- Show headers -
{
"error": {
"errors": [
{
"domain": "youtube.channel",
"reason": "brandingValidationError",
"message": "Channel branding validation failed.",
"locationType": "parameter",
"location": "brandingSettings"
}
],
"code": 400,
"message": "Channel branding validation failed."
}
}
如果您能为我提供一个示例请求,这将非常有用,因为它在错误消息中说,它找不到频道,请确保您提供了正确的频道id
在API中执行此操作的方法是,执行通道->列表请求并使用该响应对象,修改它并将其放回。(最重要的是确保id在那里并已设置。)正如它在错误消息中所说,它找不到频道,请确保您提供了正确的频道id 在API中执行此操作的方法是,执行通道->列表请求并使用该响应对象,修改它并将其放回。(最重要的是确保id在那里并已设置。)