For Helix you don’t need the accept header and the auth token needs the prefix of Bearer
curl_setopt_array($ch, array(
CURLOPT_HTTPHEADER => array(
'Client-ID: ' . $clientId,
"Authorization: Bearer oauth_code"
),
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_URL => $videosApi
));
Make sure you are generating a token and not using the client secret you can find an example of that here https://github.com/BarryCarlyon/twitch_misc/tree/main/authentication/app_access_tokens/php