openmind Posted January 23, 2009 Share Posted January 23, 2009 (edited) OK something odd is up here. Basically I cannot authenticate successfully with the API. All the following have been checked: The admin user has access to the API The username being sent is correct The password being sent is in MD5 format and is correct The API URL is right I've confirmed this on two installs both running the latest version and still get the authentication field. Any ideas? This is my code: <cfquery datasource="helmdsn" name="getuser"> SELECT * FROM account WHERE accountnumber=<cfqueryparam value="helmUserName" cfsqltype="cf_sql_varchar"> </cfquery> <cfset adminpassword=lcase(hash("myadminpassword", 'MD5'))> <cfhttp url="http://www.whmcsinstallation.com/portal/includes/api.php" method="post"> <cfhttpparam type="formfield" name="username" value="myadminuser"> <cfhttpparam type="formfield" name="#adminpassword#" value="#adminpassword#"> <cfhttpparam type="formfield" name="action" value="addclient"> <cfhttpparam type="formfield" name="firstname" value="#getuser.firstname#"> <cfhttpparam type="formfield" name="lastname" value="#getuser.lastname#"> <cfhttpparam type="formfield" name="companyname" value="#getuser.companyname#"> <cfhttpparam type="formfield" name="email" value="#getuser.primaryemail#"> <cfhttpparam type="formfield" name="address1" value="#getuser.address1#"> <cfhttpparam type="formfield" name="address2" value="#getuser.address2#"> <cfhttpparam type="formfield" name="city" value="#getuser.town#"> <cfhttpparam type="formfield" name="state" value="#getuser.county#"> <cfhttpparam type="formfield" name="postcode" value="#getuser.postcode#"> <cfhttpparam type="formfield" name="country" value="#getuser.countrycode#"> <cfhttpparam type="formfield" name="phonenumber" value="#getuser.workphone#"> <cfhttpparam type="formfield" name="password2" value="temppass"> </cfhttp> Edited January 23, 2009 by openmind 0 Quote Link to comment Share on other sites More sharing options...
CSNM-Carl Posted January 23, 2009 Share Posted January 23, 2009 I can't help with your specific problem, but are you trying to import users from Helm into WHMCS? 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted January 23, 2009 Author Share Posted January 23, 2009 It's OK, it's started working all on it's own Its for users yes but I'm writing the scripts to import users, plans and invoices from Helm. 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted January 23, 2009 Author Share Posted January 23, 2009 The main problem I have at the moment is getting the password for the Helm account as you simply cannot do it through the H3 API. You can reset it or use the API to authenticate yourself but you can't get the password nor can you decode it (that I know of;)) So the upshot is that the password field is blank for the client hosting account which means whmcs will not suspend the account when overdue. Saying that though it won't suspend domains, just the account, so it's fairly pointless anyway... 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.