leogg Posted May 17, 2017 Share Posted May 17, 2017 Hi All: I am using C# Application to connect whmcs server,my program code is follow: It return the error 403 when it calling UploadValues。 Please help,thanks。 WebClient WHMCSclient = new WebClient(); string username = "usertest"; string password = EncodeToMD5("lipasswd"); string accessKey = "abcd1234"; // Prepare a Name/Value collection to hold the post values NameValueCollection form = new NameValueCollection(); form.Add("username", username); form.Add("password", password); // the password will still need encoding is MD5 is a requirement form.Add("accesskey", accessKey); form.Add("action", "ValidateLogin"); // action performed by the API:Functions form.Add("responsetype", "xml"); // Post the data and read the response Byte[] responseData = WHMCSclient.UploadValues("http://www.mydomain.com/betaftssweb/includes/api.php", form); // Decode and display the response. //nsole.WriteLine("\nResponse received was \n{0}", string result = System.Text.Encoding.ASCII.GetString(responseData); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.