How to fetch my own videos after authenticating

Keywords´╝Ü laravel-5 google-api youtube-api google-api-php-client


I'm using laravel-socialite to authenticate with google driver. Everything goes fine and I get my token needed to make offline requests. I create a new instance of the Google Client and I pass the needed configuration to make it work. Then I create a Google Service Youtube and try to fetch my videos. I fetched some videos but they are not mine (some random videos ordered by popularity in youtube). My question here is what parameters do I need to pass and where to fetch my videos. If I need to get my youtube channel ID, how do I do that?

 if (file_exists(storage_path('app/google.json'))) {
                $userConnection = auth()->user()->connections()->where('name', 'google')->firstOrFail();

                $client = new Google_Client();

                $youtubeData = new \Google_Service_YouTube($client);

                $queryParams = [
                    'maxResults' => 25,
                    'chart' => 'mostpopular',

                $videos = $youtubeData->videos->listVideos('snippet', $queryParams);
            } else {
                throw new Exception('Google credentials json file not found');
            return $next($request);