
Twitch 400 error verify email password#
get in contact with Twitch to request the use of the password flow (which appears not to require a redirect), and use that instead.replace your WinForms/WPF app with a web app, or.use a WebBrowser control as I described above,.If this is the case, then you will need to either:
Twitch 400 error verify email code#
The presence of what appears to be a RichTextBox control, along with your comment about your code being a 'small C# application', makes me think that your code is a Windows Forms or WPF application. If the URL being navigated to begins with the redirect URL, grab the code out of the URL, cancel the navigation and hide the login web-browser control. Alternatively, you may be able to use a WebBrowser control ( Windows Forms, WPF) to handle the Twitch login, and handle a Navigating event. If your code is in a web app it will be able to respond to the URL redirected to in step 3. Your web app then reads this code out of the URL.

"&redirect_uri=" + HttpUtility.UrlEncode(" + "&client_secret=" + HttpUtility.UrlEncode(clientSecret) + I would try the following instead: string postData = "client_id=" + HttpUtility.UrlEncode(clientID) + Instead of URL-encoding the whole string, URL-encode parameter values that may contain characters other than letters and numbers. The server is probably expecting values for each of the six parameters you are attempting to send, but seeing values for none of them, and this may be why you are getting a 400 Bad Request error. Of course, it won't find any, so it will assume you have one big parameter name with no value.


When the remote server receives this data, it will scan through it looking for the & and = signs in order to separate out the parameter names and values. This has the effect of converting the & and = signs in the post data to %26 and %3d respectively. You are URL-encoding the entire post-data string. This code doesn't look right to me: string postData = "client_id=" + clientID + String temp = (new WebClient().DownloadString(URL)) private static string get_DownLoadString(string URL)

MessageBox.Show(((HttpWebResponse)respone).StatusDescription) Īnd here is the Get_DownloadString(string URL) Method. WebResponse respone = request.GetResponse() Stream datatream = request.GetRequestStream() ĭatatream.Write(byteArray, 0, byteArray.Length) Request.ContentLength = byteArray.Length Request.ContentType = "application/x-www-form-urlencoded" PostData = HttpUtility.UrlEncode(postData) īyte byteArray = encoding.GetBytes(postData) String postData = "client_id=" + clientID +ĪSCIIEncoding encoding = new ASCIIEncoding() WebRequest request = WebRequest.Create("") String code = get_DownLoadString(loginURL) "&redirect_uri= "state=TWStreamingStateAuthenticated" I try to connect to I am trying to get an oauth2 authentication on with a small C# program. I am new here and I hope someone can help me.
