My website uses the YouTube API for users to interact. Not all, but a few usernames come into my system which are non-existant channels and I'm not sure how to detect this?
They are the correct length and I already check for alphanumeric strings only. An example:
l3C9jpHV76COU9UHhWNneg
Here is the code snippet for getting the account username. Most of the time: there is no problem with this part of my code!
//User Profile Object
$userProfileEntry = $yt->getUserProfile('default');
//Get the username of the currently authed channel
$AuthedAccountName = (string)$userProfileEntry->getUsername();