cPanel cURL Authentication without WHM
Hello everyone,
I was working on a part of my web application, which logins the user with a single click on a button in the cPanel of their website, based on the IP Address, Port, cPanel Username & Password provided before.
On what I got on browsing the web about this problem, I found that a way of doing this is a cURL post request to the specific URL (';
return $h;
And for that return of the headers, I can get this results: I see that it kinda logs me in and I get the '/cpsessXXXXXX/frontend/paper_lantern/index.html?login=1&post_login=XXXXXX' URL, but when trying to redirect to '
Along the headers, I can see that I'm logged in, but in the same web app URL (see attachments). In a summary, I have a button on the user page, which needs to redirect (login) inside the cPanel, based on the IP, Port, cPanel username & password. If someone is familiar, I know hosting providers do this in their panel. They provide the same button in the panel of the domain and by clicking it, you will be redirected inside the cPanel of that domain, and be able to access stuff like File Manager, etc. Hopefully someone can help me with this. Thanks you!
And for that return of the headers, I can get this results: I see that it kinda logs me in and I get the '/cpsessXXXXXX/frontend/paper_lantern/index.html?login=1&post_login=XXXXXX' URL, but when trying to redirect to '
Along the headers, I can see that I'm logged in, but in the same web app URL (see attachments). In a summary, I have a button on the user page, which needs to redirect (login) inside the cPanel, based on the IP, Port, cPanel username & password. If someone is familiar, I know hosting providers do this in their panel. They provide the same button in the panel of the domain and by clicking it, you will be redirected inside the cPanel of that domain, and be able to access stuff like File Manager, etc. Hopefully someone can help me with this. Thanks you!
-
I beleive the following might be what you're looking for: Guide to API Authentication - Secure Remote Logins - Developer Documentation - cPanel Documentation - this is the preferred method Guide to API Authentication - Username and Password Authentication - Developer Documentation - cPanel Documentation - this is what appears to be the method you're using The entire guide to authentication can be found here: Guide to API Authentication - Developer Documentation - cPanel Documentation which works for both cPanel and WHM functions. 0 -
Can someone still have a look into this, please? 0
Please sign in to leave a comment.
Comments
3 comments