I am trying to get messages from the live chat chat using a GET request.
$json_result = file_get_contents("https://www.googleapis.com/youtube/v3/liveChat/messages?liveChatId=$videoId&part=snippet&key=$api_key");
// $videoId и $api_key true, there are no errors.
echo '<pre>';
var_dump(json_decode($json_result));
echo '</pre>';
In the answer I get NULL, tell me what is the error or what method can I get messages from the YouTube broadcast chat?