Jump to content

Api call get password not working


Recommended Posts



i have 3 active whmcs website and i am developing a package to handle some of our needs.


I was trying to get users password with http://docs.whmcs.com/API:Get_Clients_Password But it seems not working;


I tried for my first website and it is returns wrongs users password.Checked so many times.


I tried for last 2 website and api cant find user at all.( Client ID Not Found )


I tried for both userid and password nothing has changed.I dont want to create custom api function.So any idea?

Link to comment
Share on other sites

Hi @klan


Here i am using external api, here is my code but i did try with rest clients like postman too.



 public function getClientsPassword($identity,$params=[])
       is_int($identity) ? ($params['userid']=$identity) : ($params['email']=$identity);

       $response= $this->getJson('getclientpassword',$params);

       return !$response ?: $response->body->password;


public function getJson($action,$params=NULL)

       $data = ($params===NULL) ?: array_merge($data,$params);

       $response = Request::get($this->dataUrl($data))

           return false;

       return $response;

$this->dataUrl simply generates url like


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