Requests from referer "" are blocked."I'm using YouTube API v3 search in my laravel application.
$params = array("part" => "snippet","q" => $term,"type" => "channel","maxResults" => $limit,"key" => env('YOUTUBE_KEY') ); $curl_session = curl_init(); $curl_options = array( CURLOPT_URL => 'https://www.googleapis.com/youtube/v3/search?'. http_build_query($params), CURLOPT_RETURNTRANSFER => true, ); curl_setopt_array($curl_session, $curl_options); $response = curl_exec($curl_session); curl_close($curl_session); $response = json_decode($response, true); return $response;
The search should work as expected.