Jump to content

API Question


nielsenj

Recommended Posts

Hello,

 

What i'm trying to do is essentially create a loginshare between IPB and WHMCS.

 

With the new version of IPB i can use an external login rather easily, the key is drawing off the password by the users email. This would allow me to validate a login on IPB on WHMCS's user table.

 

I've followed the example API in manual, and can obtain the password by issuing a "getclientpassword" for a specific userid.

 

Side note: it would be nice to draw the password off using an email address instead.

 

Since i can't draw the password off using the email address, i'm trying to issue a "getclientsdata" and configuring the "email" so then i can draw off the user ID and use that to obtain the password (unless the password is contained in the returned information already).

 

The issue is, when i use this method i get an "Client ID Not Found" return through the API, even though the client exists with that email in the database.

 

Am i missing something else i have to configure? According to the manual those are the only two fields required to get client information back.

 

Any help would be appreciated.

Link to comment
Share on other sites

I figured out the issue.

 

The manual page: http://v3manual.whmcs.com/display.php?id=167 states that it's to get the client data by ID.

 

The actual variables to set to obtain this information via client ID are:

 

$postfields["action"] = "getclientsdata";

$postfields["clientid"] = "1";

 

The manual page: http://v3manual.whmcs.com/display.php?id=168 states that it's to get the client data by email.

 

The actual variables to obtain this information by the email address are:

 

$postfields["action"] = "getclientsdatabyemail";

$postfields["email"] = "demo@whmcs.com";

 

Furthermore, in the manual page: http://v3manual.whmcs.com/display.php?id=136 it states that the returned password is stored in "password2", it is not, it is stored in "password".

 

Hopefully this will help some of you trying to use the API from the online documentation.

 

Regards,

J

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.

Guest
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