Any alternatives of deprecated property “googlePlu

2019-07-29 11:47发布

As you can see in Youtube API revision history:

The channel resource's contentDetails.googlePlusUserId property has been deprecated. Previously, the property was only present if the channel was associated with a Google+ profile. Following the deprecation, the property will no longer be included in any channel resources.

So, how can I understand wich Google account relates to a Youtube Channel?

标签: youtube-api
1条回答
小情绪 Triste *
2楼-- · 2019-07-29 11:51

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.

People: get

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.

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.

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

查看更多
登录 后发表回答