How to configure login from WHMCS to SolusVM administrator area through API credentials?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Question

How to configure login from WHMCS to SolusVM administrator area through API credentials?

Answer

  1. Connect to WHMCS server over SSH.

  2. Create a copy of solusvmpro.php file:

    # cp -a {whmcs_root}/modules/servers/solusvmpro/soluvmpro.php{,.copy}

    replace {whmcs_root} with the actual path to WHMCS web root.

  3. In {whmcs_root}/modules/servers/solusvmpro/soluvmpro.php change section:

    CONFIG_TEXT: $code = '<form action="' . ( $fwdurl ) . '/admincp/login.php" method="post" target="_blank">
    <input type="hidden" name="username" value="ADMINUSERNAME" />
    <input type="hidden" name="password" value="ADMINPASSOWRD" />
    <input type="submit" name="Submit" value="Login" />
    </form>';

    to

    CONFIG_TEXT: $code = '<form action="' . ( $fwdurl ) . '/admincp/login-api.php" method="post" target="_blank">
    <input type="hidden" name="api_id" value="'.$params["serverusername"].'" />
    <input type="hidden" name="api_key" value="'.sha1($params["serverpassword"]).'" />
    <input type="submit" name="Submit" class="btn btn-sm btn-default" value="Login" />
    </form>';

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.