Jump to content

API - Create a button for cPanel Login?


wellconnit

Recommended Posts

Hi All,

 

I was wondering if someone can point me in the right direction to create a button that will link to the specific customer cPanel.

 

I've got the service details, etc displaying but i'm unsure of the best way to add a button to the page that will take the user to the cPanel screen that the service is related too.

 

I'm guessing I'll need to get an authentication key of some sort but i'm unsure of the steps that I should be taking to get this done.

 

Any assistance is appreciated.

 

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
  • WHMCS Developer

I guess from this you are creating your own client area away from WHMCS?

 

There isn't an API command that would provide a login button for you. You can see the existing login button in modules/servers/cpanel/templates/loginbuttons.tpl - however this would require that the client is signed into WHMCS to work.

Link to comment
Share on other sites

I guess from this you are creating your own client area away from WHMCS?

 

There isn't an API command that would provide a login button for you. You can see the existing login button in modules/servers/cpanel/templates/loginbuttons.tpl - however this would require that the client is signed into WHMCS to work.

 

Thanks for the response Andrew, yeah I'm creating my own client area using the API to get all the details.

 

I know I probably can't get a direct login button, but is there no way to authenticate using OAuth or something else and then just try redirecting to the page?

 

Currently they verify their login using the API and then their Client ID & rest of the details are returned which I use to grab their details out of the DB.

 

Any additional help on this is great.

Link to comment
Share on other sites

  • WHMCS Developer

Whilst you couldn't use WHMCS SSO, you could use https://docs.whmcs.com/AutoAuth to redirect the user to the url you wish within the client area.

 

Alternatively, you could also build your own sign on link using the WHM API - https://documentation.cpanel.net/display/SDK/WHM+API+1+Functions+-+create_user_session

Link to comment
Share on other sites

  • 1 month later...

Hi Andrew,

 

Sorry to bump an old thread but is there a way to use AutoAuth with a goto pointing towards the cPanel login??

Otherwise is it possible to store the autoauth credentials so that when it tries to authenticate it will login automatically and not prompt for a login??

 

Looking for any other suggestions you may have on this also.

 

Thanks 

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.

×
×
  • 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