Insufficient Permission when run youtube retriving comments

前端 未结 4 2008
离开以前
离开以前 2020-12-20 03:40

This is my whole code. I want to give a video ID which from youtube to get the comments related to this vedio ID. But always show that I have Insufficient Permission.

4条回答
  •  半阙折子戏
    2020-12-20 04:20

    You only need a key to retrieve comments. Something like this:

    String apiUrl = "https://www.googleapis.com/youtube/v3/commentThreads?part=snippet%2Creplies&videoId=" + ytId + "&moderationStatus=published&order=relevance&maxResults=5&key=" + apiKey;
    

    Then handle the Json response.

提交回复
热议问题