问题描述
如您在Youtube API修订历史中所见:
As you can see in Youtube API revision history:
那么,我怎么能知道哪个Google帐户与Youtube频道相关?
So, how can I understand wich Google account relates to a Youtube Channel?
推荐答案
我唯一想到的选择是调用人们:得到,将我用作用户ID.这将为您提供当前用户的ID.
The only option that I can think of would be to call People: get using me as the userid. This will give you the id of the current user.
人们:得到
获取某人的个人资料.如果您的应用使用范围 https://www.googleapis.com/auth/plus.login,保证此方法返回ageRange和语言.立即尝试或查看示例.
Get a person's profile. If your app uses scope https://www.googleapis.com/auth/plus.login, this method is guaranteed to return ageRange and language. Try it now or see an example.
如果使用userId值"me",则此方法需要使用已被授予OAuth范围 https://www.googleapis.com/auth/plus.login 或 https://www.googleapis.com/auth/plus.me .了解有关OAuth的更多信息.
If using the userId value "me", this method requires authentication using a token that has been granted the OAuth scope https://www.googleapis.com/auth/plus.login or https://www.googleapis.com/auth/plus.me. Read more about OAuth.
GET https://www.googleapis.com/plus/v1/people/me
这将需要其他身份验证范围.
This will require an additional authentication scope.
这篇关于弃用的属性"googlePlusUserId"是否可以替代?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!