As I understand it, there are 2 types of channels:

https://www.youtube.com/user/username and

https://www.youtube.com/channel/channelid

Channel data can be obtained using YouTube Data API methods. For example, I need to get 11 videos from the channel.

$videosResponse = $youtube->search->listSearch('id,snippet', array( 'channelId' => $chanelId, 'maxResults' => 11, 'order' => 'date' )); 

But if you pass not the channel id, but the user id, then there will be an error:

 { "error": { "errors": [ { "domain": "youtube.search", "reason": "invalidChannelId", "message": "Invalid channel.", "locationType": "parameter", "location": "channelId" } ], "code": 400, "message": "Invalid channel." } } 

Question: how to get video from channels like youtube.com/user/username ?

0