You already know how, since you have a clientID header…
curl_setopt_array($ch, array(
CURLOPT_HTTPHEADER => array(
'Client-ID: ' . $clientId,
'Accept': 'application/vnd.twitchtv.v5+json'
),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_URL => $channelsApi . $channelName . $apiVers
));
Also as documented:
https://dev.twitch.tv/docs/v5/guides/migration#username-versus-user-id
You need to convert the usernames to userID’s