Hi,
I am trying to get channel ID here, I cant seem to get this working, yet It should
private string GetChannel(string channel)
{
string result;
using (HttpRequest httpRequest = new HttpRequest())
{
httpRequest.UserAgent = Http.RandomUserAgent();
httpRequest.IgnoreProtocolErrors = true;
httpRequest.Reconnect = false;
for (; ; )
{
try
{
result = Regex.Match(httpRequest.Get(string.Concat(new string[]
{
"https://api.twitch.tv/api/channels/",
channel,
"/access_token?need_https=true&oauth_token=REMOVED",
"&platform=web&player_backend=mediaplayer&player_type=site"
}), null).ToString(), "channel_id\\\\\":(.*?),\\\\\"chansub").Groups[1].Value;
break;
}
catch (Exception)
{
result = "";
}
}
}
Guys what am I doing wrong? Please help me I cant really wrap my head around what I am doing wrong
ADMIN EDIT: Remove oAuth Token