Channel name is username, right?


#1

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,


#2

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);

#3

Thank you for your quick response. URL is a channel URL, right? (Screenshot below)

https://drive.google.com/file/d/1ESXNIlLUc2DW4uCA-Rp9wVSY-LC7cXbI/view?usp=sharing


#4

yes


#5

Thank you!