I want to add to the application the ability to pull likes and dislikes from these videos. Rather, I implemented it by parsing the page, but this solution seems to me resource-intensive. I wanted to learn how to use Youtube-api and in this connection several questions arose:

  1. As far as I understand from the documentation, the authorization and key are optional for such requests, since I do not add or change the content. Is this true?

  2. As api-explorer suggests, I can generate a type request

    POST https://www.googleapis.com/youtube/v3/videos/rate?id=G2X3DVVJL2Q&rating=like&key={YOUR_API_KEY} 

Is it possible to transfer the entire link to a specific api method? What should the request return? String, int, json?

The examples given in the documentation are more complicated than my task, but at the same time they do not reveal its solutions.

    1 answer 1

    Read the documentation on their api on the developer’s off site - https://developers.google.com/youtube/v3/sample_requests , all requests for information are described there

    • I need a java request implementation. I can generate the request body. In the java examples, I did not find a way to do this without authorization and a solid request. - Victor Morozov
    • @VictorMorozov Well, take send a request, read the resulting JSON object - GenCloud
    • Question: how to send a request Answer: take and send :) - Victor Morozov
    • According to you, it will be enough to have queries like URLConnection connection = new URL ("") .openConnection (); If so, answer, is this your opinion or fact? Did you work with Youtube data api or is it a theory? - Victor Morozov
    • @VictorMorozov I worked with both yotube api and Vk api. That there, that there the principle is the same. You, I do not know, would have driven uri into the browser, but looked at the result - GenCloud