在 YouTube 中收到 "invalidCategoryId" 条错误消息
Getting "invalidCategoryId" error message in YouTube
在使用 ID 为 21 的 "Videoblogging" 类别时,使用 API 将视频上传到 YouTube 时似乎出现错误。我什至使用文档检索 ID 于https://developers.google.com/youtube/v3/docs/videoCategories/list 在 "Try it" 部分下。
{
"kind": "youtube#videoCategory",
"etag": "\"0Fu6lI6VPLdRMlQU3wwNcowdAUs/EapFaGYG7K0StIXVf8aba249tdM\"",
"id": "21",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Videoblogging",
"assignable": false
}
与运动等其他类别
{
"kind": "youtube#videoCategory",
"etag": "\"0Fu6lI6VPLdRMlQU3wwNcowdAUs/9GQMSRjrZdHeb1OEM1XVQ9zbGec\"",
"id": "17",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Sports",
"assignable": true
}
唯一的区别是可分配,因此不可分配的类别将不起作用,因为围绕该区域的文档不明确。
VideoCategories
snippet.assignable
- Indicates whether videos can be associated with the category.
根据此文档,似乎 assignable 与 false 值将 return 将视频与此类别相关联时出现“invalidCategoryId”错误消息。
希望对您有所帮助
在使用 ID 为 21 的 "Videoblogging" 类别时,使用 API 将视频上传到 YouTube 时似乎出现错误。我什至使用文档检索 ID 于https://developers.google.com/youtube/v3/docs/videoCategories/list 在 "Try it" 部分下。
{
"kind": "youtube#videoCategory",
"etag": "\"0Fu6lI6VPLdRMlQU3wwNcowdAUs/EapFaGYG7K0StIXVf8aba249tdM\"",
"id": "21",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Videoblogging",
"assignable": false
}
与运动等其他类别
{
"kind": "youtube#videoCategory",
"etag": "\"0Fu6lI6VPLdRMlQU3wwNcowdAUs/9GQMSRjrZdHeb1OEM1XVQ9zbGec\"",
"id": "17",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Sports",
"assignable": true
}
唯一的区别是可分配,因此不可分配的类别将不起作用,因为围绕该区域的文档不明确。
VideoCategories
snippet.assignable
- Indicates whether videos can be associated with the category.
根据此文档,似乎 assignable 与 false 值将 return 将视频与此类别相关联时出现“invalidCategoryId”错误消息。
希望对您有所帮助