如何在 YouTube Data API v3 中获取当前用户的个人资料信息 [英] How to get current user's profile information in YouTube Data API v3

查看:23
本文介绍了如何在 YouTube Data API v3 中获取当前用户的个人资料信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 V2 中,您可以点击 /api/users/default 路径来获取用户名等信息.这在此处记录:https://developers.google.com/youtube/2.0/developers_guide_protocol_profiles

In V2 you could hit the /api/users/default path to get infomation such as the user's username. This is documented here: https://developers.google.com/youtube/2.0/developers_guide_protocol_profiles

在我们迁移到 V3 的过程中,我还需要能够提取用户的用户名,但找不到任何说明如何执行此操作的文档.这个功能是在 V3 中复制的,还是有其他方法来完成这个任务?

In our migration to V3 I also need to be able to pull the users username, but can't find any documentation showing how to do so. Is this functionality replicated in V3, or is there another way to accomplish this task?

谢谢!

推荐答案

在 v3 中,用户信息基本上就是频道信息.通过执行频道->列表https://developers.google.com/youtube/v3/docs/频道/列表",您将在snippet.channelId"下获得信息https://developers.google.com/youtube/v3/docs/channels#snippet.channelId"

In v3, user info is basically channel info. By doing a channels->list "https://developers.google.com/youtube/v3/docs/channels/list", you will get the information under 'snippet.channelId' "https://developers.google.com/youtube/v3/docs/channels#snippet.channelId"

这篇关于如何在 YouTube Data API v3 中获取当前用户的个人资料信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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