Hey guys, i coded myself a little Group Chat Inviter in c#.
It worked fine until it tried to invite an user who’s name ended with an underscore. (Monoxide13_)
I’m actually not sure if it’s an issue with the function i’m using or with the api but since every single name before worked fine i guess it’s the api.
using (var wb = new WebClient())
{
var data = new NameValueCollection();
data["oauth_token"] = _oauth;
data["username"] = username;
data["irc_channel"] = _channel;
var response = wb.UploadValues("http://chatdepot.twitch.tv/room_memberships", "POST", data);
}
The exception i get with the mentioned username is
The remote server returned an error: (400) Bad Request.
at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
at GroupChatInviter.ProgressForm.InviteThread() in c:\Users\Freddy\Documents\Visual Studio 2013\Projects\GroupChatInviter\GroupChatInviter\ProgressForm.cs:line 81
Any suggestions how to fix that?
Regards
Freddy