我想在他/她在我的网站

时间:2015-12-06 22:39:59

标签: youtube

我想在他/她登录我的网站后在youtube上获取用户的观看历史记录,当我尝试使用此API时,我无法获得此请求的数据。

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

我认为所以我无法通过用户频道的事情我不知道该通过哪个以及要通过的内容请让我知道当用户在我的网站上使用谷歌帐户并获得以下权限时:

$client->addScope("email");
$client->addScope("profile");
$client->addScope('https://www.googleapis.com/auth/youtube');
$client->addScope('https://www.googleapis.com/auth/youtubepartner-channel-audit');

我可以获得观察名单吗?

提前致谢

1 个答案:

答案 0 :(得分:0)

A Youtube API team member said here in 2012 about the watch history data

This feed allows authenticated API users to retrieve their own YouTube viewing histories—retrieving the watch history of any other user is not allowed.

Thus you can only retrieve the watch history of your own profile.

I find this disappointing. I haven't found any information that this has changed since 2012, but perhaps the potential of its use (to make online apps specialized for viewing preferences of the user), could have changed this.