- Регистрация
- 15.04.2016
- Сообщения
- 647
- Благодарностей
- 107
- Баллы
- 43
Уже замучался, сдаюсь.
Кто может подсказать, в чём причина? Вот код
Кто может подсказать, в чём причина? Вот код
Код:
string email = project.Variables["mail"].Value;
string cookie = project.Variables["cookie"].Value;
string captcha = project.Variables["captcha"].Value;
WebClient client = new WebClient();
string content = @"json%3D%7B%22first_name%22%3A"+project.Profile.Name+@"%2C%22last_name%22%3A"+project.Profile.Surname+@"%2C%22username%22%3A"+project.Profile.NickName+project.Profile.SecretQuestionAnswer1+@"%2C%22password%22%3A"+project.Profile.Password+@"%2C%22email%22%3A"+email+@"%2C%22bonus_info%22%3A%7B%22TimeZone%22%3A%2214400%22%2C%22time%22%3A"+(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds+@"%2C%22Language%22%3A%22en-US%22%2C%22ga%22%3AGA1.2.74937490.1505648515%7D%2C%22campaigns%22%3A%22%22%2C%22g-recaptcha-response%22%3A"+captcha+@"%7D%22";
client.Headers.Add("Host","www.textnow.com");
client.Headers.Add("User-Agent","Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:45.0); Gecko/20100101 Firefox/45.0");
client.Headers.Add("Accept","application/json, text/plain, */*");
client.Headers.Add("Accept-Language","en-US,en;q=0.5");
client.Headers.Add("Accept-Encoding","gzip, deflate");
client.Headers.Add("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
client.Headers.Add("Referer","https://www.textnow.com/signup");
client.Headers.Add("Cookie",cookie);
client.Headers.Add("Content-Length",content.Length.ToString());
client.Headers.Add("Connection","Keep-Alive");
project.Variables["test"].Value = client.UploadString("https://www.textnow.com/api/users/vYGRzfuiDBJ", "PUT", content);