Need help with "Accept: application/vnd.twitchtv.v5+json"

Hello guys. I have a website that lists certain streams when they are online.
Recently it stopped working

As I understand after reading migration guide I need to put Accept: application/vnd.twitchtv.v5+json somewhere in the code.

So I have the following:

$twitch_url = "". $twitch_channels ."";
                    $clientId = 'xxxxxxxxxxxxxxxxxxxxxxxx';
		$curl = curl_init();
                    curl_setopt_array($curl, array(
                    CURLOPT_HTTPHEADER => array(

   'Client-ID: ' . $clientId
		CURLOPT_URL => $twitch_url));

		$data = curl_exec($curl);


Could you please help me to put “Accept: application/vnd.twitchtv.v5+json” properly

curl_setopt_array($curl, array(
   'Client-ID: ' . $clientId,
   'Accept: application/vnd.twitchtv.v5+json'

It’s a header so should be sent as a header like you do with the clientID

Thx a lot Barry!

Unfortunately it didn’t help. I have streamers’ usernames stored in databes, maybe I should change usernames to IDs?

Yes v5 uses ID’s not usernames

Hey @RealPaleMan

I am also facing same issue.
Would you please share your website url.

I provided the solution.

All the steps needed to migrate are documented here:

There is no point in sharing my website url since nothing is working there (I have no time and no skills to make it work). But if your site is using wordpress I can recommend “Twitch TV Easy Embed” plugin, it works

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.