Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : Api for Wordpress doesnt work



Threaded Mode | Print  

 Api for Wordpress doesnt work (5 Replies, Read 2568 times)
Flexamedia
Group: Member
Post Group: Newbie
Posts: 3
Status:
I've been trying to get softaculous's api working for a few hours now. But this is apparently easier said than done.

My goal is to generate a link that makes it possible to automatically log in to the Wordpress Admin Panel.

According to the api manual I can use the "Auto Login to WordPress admin panel" method. For this you will be asked for an "insid" value. You can find this value in the method "List WordPress Installations". Its clear so far.

But when I look at what is asked to generate a list of Wordpress installations, I see the following.
Code
curl "https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?act=wordpress&api=json"

From this link that I read from your API manual, the username and password are the user who manages the wordpress and the domain on which the wordpress and softaculous are installed. But I get from Cpanel that the security token is incorrect.

The security token doesn't seem to appear in the API manual or I'm reading it wrong.
Could the documentation be out of date or am I doing something wrong?

Does anyone know how to generate the automatic admin wordpress login url?

Thank you in advance.
IP: --   

Api for Wordpress doesnt work
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5652
Status:
Hi,

Please use "jupiter" instead of paper_lantern in the URL. We will update the docs by tomorrow.

You can refer to the following guide on how to get the insid :
https://www.softaculous.com/docs/api/api/#list-installed-script

You can refer to the following guide on how to get sign on link :
https://www.softaculous.com/docs/api/api/#auto-sign-on

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

Api for Wordpress doesnt work
Flexamedia
Group: Member
Post Group: Newbie
Posts: 3
Status:
This does indeed seem to do more than before, thanks for this.

I have 1 more question regarding the API environment. From the documentation I read that there are 2 authentication options. An End user and an Admin user. What is meant by option 2 here?
Because I'm trying to request a list through my root account so that I can pull in all the installs but it seems the root account isn't taking it.

The normal end user works fine only then I would need the user's login. That is not possible from CPanel to retrieve the user's login.
IP: --   

Api for Wordpress doesnt work
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5652
Status:
Hi,

Can you please share the code you are using to fetch the list from admin ?

Since you need to fetch the details of all user installations you should be use 1st authentication i.e. admin.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

Api for Wordpress doesnt work
Flexamedia
Group: Member
Post Group: Newbie
Posts: 3
Status:
I use the following command:

Code
curl "https://root:pAs$w0oRd@server3.host.com:2083/frontend/jupiter/softaculous/index.live.php?act=installations&api=json"


The reply I get is a HTML login page of CPanel.
IP: --   

Api for Wordpress doesnt work
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5652
Status:
Hi,

There are some issues on your curl URL :

1. You are using root credentials on port 2083 which is not allowed by cPanel. You should either use the username of the user for which you want to find the list of installations and your root password with port 2083 e.g. :
user:password@server.host.com:2083

or use the root password on port 2087.

2. user:password authentication is not supported by WHM on port 2087 so you can use the following authentication mechanism. E.g. :
curl -H'Authorization: whm root:MYAPITOKEN' 'https://server.host.com:2087/cgi/softaculous/index.php?act=installations&api=json'

Note : Use port 2083 if you want to list installations of a single cPanel user and use port 2087 if you want to list the installations of all cPanel users on the server.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 27, 2024, 10:45 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.337