On Twitch, the username is the channel too, right?
By the way, how can I get the channel URL by oauth_token in PHP?
Thanks,
On Twitch, the username is the channel too, right?
By the way, how can I get the channel URL by oauth_token in PHP?
Thanks,
Yes, different language is used in the docs to differentiace a broadcaster/channel from a viewer in say the subscriber checking docs
You can use cURL withi this end point
Something like this would work
<?php
$ch = curl_init('https://id.twitch.tv/oauth2/validate');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization: OAuth ' . $token
));
$r = curl_exec($ch);
$i = curl_getinfo($ch);
curl_close($ch);
print_r($r);
Thank you for your quick response. URL is a channel URL, right? (Screenshot below)
yes
Thank you!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.