cmsplushosting Posted July 21, 2011 Share Posted July 21, 2011 I have the following code: Dim WHMCSClient As New WebClient() Dim form As New NameValueCollection() form.Add("username", My.Settings.WHMCSUser.ToString()) form.Add("password", Crypto.RijndaelSimple.Decrypt(My.Settings.WHMCSPass.ToString(), "hahaaha", "adgaga44", "SHA1", 2, "yyaa5525234444", 256)) form.Add("action", "getsupportstatuses") Dim newURL As String = My.Settings.WHMCSBaseURL & "/includes/api.php" Dim responseData As Byte() = WHMCSClient.UploadValues(newURL, form) Dim pass As String = Crypto.RijndaelSimple.Decrypt(My.Settings.WHMCSPass.ToString(), "hahaaha", "adgaga44", "SHA1", 2, "yyaa5525234444", 256) TextBox1.Text = String.Format("Base URL: " & newURL & vbCrLf & "User: " & My.Settings.WHMCSUser.ToString() & vbCrLf & "Pass:" & pass & vbCrLf & "{0}", Encoding.ASCII.GetString(responseData)) I changed the password displayed here, but what this is passing is a valid user and password, and the base URL; I keep getting the following returned from the web service. Base URL: http://mywhmcontrolpanelsite.com/includes/api.php User: adminuser Pass:adminpass123 result=error;message=Authentication Failed; I added the IP I'm accessing from in the General > Security Settings tab, still no luck, however if I remove all the IP's from that list, I then get Access Denied messages. Any help would be appreciated, or anything you can think of. Any particular other settings to look out for? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted July 22, 2011 WHMCS CEO Share Posted July 22, 2011 Are you definately "posting" the variables? A query string GET request won't work for the authentication details. Matt 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.