I Want to solve captcha using 2captcha API.
string Key = "12345678901234567890123456789012";
string Method = "base64";
string DataForPost = $"key={Key}&method={Method}&imginstructions={Imginstructions}";
request.ContentLength = DataForPost.Length;
string responseText = "";
byte[] bytes = Encoding.ASCII.GetBytes(DataForPost);
request.ContentLength = bytes.Length;
using (Stream reqStream = request.GetRequestStream())
{
reqStream.Write(bytes, 0, bytes.Length);
reqStream.Close();
}
using (WebResponse resp = request.GetResponse())
{
Stream respStream = resp.GetResponseStream();
using (StreamReader sr = new StreamReader(respStream))
{
responseText = sr.ReadToEnd();
}
}
Imginstruction is base64 string for image and size is about 4KB. When I ran above code, I got error message - "ERROR_ZERO_CAPTCHA_FILESIZE". This error means 'File size under 100bytes', but I cannot understand because file size is about 4kb.
If you have any idea for this problem, please tell to me.