0
votes

I used the youtube analytics api console ([https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v1/youtubeAnalytics.reports.query?][1]) to retrieve details of videos (from my channel), values for id : channel==4aYYO.... metrics : video .
The response I get is 403 Forbidden code: 403, message: "Forbidden
Can anyone point out if I am missing any permission ?

      [1]: https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v1/youtubeAnalytics.reports.query?
2
Are you using any of the client libraries? Have you authorized the request with oauth?Greg Schechter
Yes did the Oauth steps. I am not using client libraries, was trying through the explorer only. I turned on the Youtube Analytics Api and Youtube Data Api in code.google.com/apis/console/… ..Ranjith

2 Answers

0
votes

Channel ids begin with UC. Can you try UC4aYYO... and see if that works?

0
votes

First, use the ChannelList method in the YouTube Data API to your Channel ID's. This must be an authenticated call, so click the Authorize Requests slider in the API explorer. Make sure you are logged in with the Google account which owns the channel.

API Explorer Query

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=snippet&mine=true&_h=1&

Here is more explanation from Jeff at Google.

How do I get a list of YouTube channels, and associated channel URLs (user or channel), owned by an authenticated user