Jump to content

The API of ValidateLogin return error 403


Recommended Posts

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);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated