-2

When i try to get api_user_key using this code, api_dev_key,api_user_login and api_user_password replaced, but I am not sure, that it is correct;

WebRequest req = WebRequest.Create("http://pastebin.com/api/api_login.php");
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";              
byte[] Bytes = System.Text.Encoding.UTF8.GetBytes("api_dev_key=12345678901234567890012345678901&api_user_login=lll&api_user_password=lll");
req.ContentLength = Bytes.Length;
Stream os = req.GetRequestStream();
os.Write(Bytes, 0, Bytes.Length);
os.Close();
WebResponse resq = req.GetResponse();
StreamReader ss = new StreamReader(resq.GetResponseStream());
return ss.ReadToEnd();
4

1 回答 1

0

你应该通过api_user_name(不是api_user_login

于 2015-01-01T20:45:21.270 回答