В контроллере Twitch авторизации нужно получать платные подписки пользователя. Вот запрос
$s_user = Socialite::driver('twitch')->user();
$url = "https://api.twitch.tv/kraken/channels/$s_user->name/subscriptions?limit=10";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept: application/vnd.twitchtv.v5+json',
'Client-ID: ' . env('TWITCH_ID'),
'Authorization: OAuth ' . $s_user->token,
'Content-Length: 0'
));
$subscriptions = json_decode(curl_exec($ch));
curl_close($ch);
dd($subscriptions);
В итоге
{#377 ▼
+"error": "Not Found"
+"status": 404
+"message": "Channel 'channel_name' does not exist"
}
Канал существует.
Уже все что нагуглил перепробовал, но ничего не выходит.