YouTube API-无频道名称 [英] Youtube API - no channel name

查看:110
本文介绍了YouTube API-无频道名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Youtube数据API检索我的Youtube频道名称,但我得到的是空商品.我的YouTube帐户中有一个频道,因此它应该返回一个频道.

I'm trying to retrieve my Youtube channel name using Youtube data API but I'm getting empty item. I have a channel in my Youtube account so it should return one.

这些是我输入的查询属性-

These are the query properties I entered -

part:'contentDetails', forUsername: 'Seong+Lee',

从其交互式文档页中获得以下回复.

to get the following response from their interactive documentation page.

200 OK
- SHOW HEADERS -
{
 "kind": "youtube#channelListResponse",
 "etag": "\"fpJ9onbY0Rl_LqYLG6rOCJ9h9N8/C3QZ-VsykvkpW2zCm7VjGBCayqc\"",
 "pageInfo": {
  "totalResults": 0,
  "resultsPerPage": 5
 },
 "items": [
 ]
}

在我的应用程序中,我得到相同的响应,因此我认为请求代码没有问题.为什么我找不到频道名称?

In my app I get the same response so I figured there is no issue with my request code. Why can't I get the channel name?

推荐答案

您可以使用频道ID来检索contentDetails.

You can retrieve your contentDetails by using your channel ID.

GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=UCwy6X3JB24VTsDFqMwdO5Jg&key={YOUR_API_KEY}

您的用户名显然无效.

这篇关于YouTube API-无频道名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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