Jump to content
  • 0

Whm Api Integration


andream

Question

Hello,

I have a reseller account provided by an hosting company.

It comes to me with a WHM API (xml-api) that can be used to integrate the reseller hosting with billing software.

It's composed by: API server URL, API Username, API Password and Server IP Address. It seems working only with WHMCS while it's incompatible with other billing software, included yours too.

In fact I tried to create a new server in Blesta Admin Panel using these credentials (API Username, API Password etc.) but it's not able to establish a connection so it doesn't work.

Is there any way to get it working?

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 0

That is strange, but they may mean they only offer support/help for WHMCS customers.

 

You may also be behind a NAT, or have multiple outgoing IP addresses. You'll need to be sure they are all whitelisted. You could also try installing Blesta on the same server as WHMCS (which seemed to be able to connect). That could rule out the IP issue.

Link to comment
Share on other sites

  • 0

That is strange, but they may mean they only offer support/help for WHMCS customers.

 

You may also be behind a NAT, or have multiple outgoing IP addresses. You'll need to be sure they are all whitelisted. You could also try installing Blesta on the same server as WHMCS (which seemed to be able to connect). That could rule out the IP issue.

 

Yes, it's strange.

Blesta is currently installed on the main reseller domain as WHMCS.

I had successfully added the correct IP Address (Shared Server IP Address) in this field: "API Allowed IP Address (main IP of server you are connecting from)"

Are you sure that your software allow API Username? It looks like: sadkP92saAS1j31msaaspScsaSxsaEewa123zaDsad12

The reseller hosting provider I'm talking about is: myownfreehost.net

 

Their reply: "The api using the WHM XML api, any scripts that call it must use this api (not the JSON api ) ."

Link to comment
Share on other sites

  • 0

Blesta uses the JSON API when communicating with cPanel. This is the preferred method according to cPanel.

 

From: http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/XmlApi

 

 

Important: The JSON API is much less resource-intensive than the XML API. We highly recommend using the JSON API, especially if performance is important, since it provides much faster results.

 

I would suggest you point your host to this and tell them to enable JSON API support. I'm actually amazed it can be disabled.

Link to comment
Share on other sites

  • 0

It doesn't seem to be so simple. They replied in this way:

Please do remember that our api is a reverse engineer of the whm xml api.

 

 

so I told them:

 

So wouldn't be possible to enable JSON API support or to create a reverse engineer of the whm JSON api?
As cPanel said "it's much less resource-intensive than the XML API and it provides much faster results"

 

 

and their final reply:

 

" or to create a reverse engineer of the whm JSON api?"
That is what would be needed, however this would invoice a reasonable amount of coding time.

"As cPanel said "it's much less resource-intensive than the XML API and it provides much faster results&"
Thats due to cpanel writing bad code, there is no reason at all why xml or json should be any different in speed (our xml api is around 4 times quicker than whm's json implementation.

 

 

In this page http://docs.blesta.com/display/dev/API I read that "The API supports XML, JSON, and PHP serialization formats. By default JSON formatting is used. So if there is an error detecting the format of the request (due to a bad URL, for example) the error response will be returned in JSON format."

 

Is there any way to get XML as default instead of JSON?

Link to comment
Share on other sites

  • 0

Ok, sorry I missed that. It looks like they are using a cPanel theme called VistaPanel. As far as I can tell, VistaPanel is just a theme, so not sure what else they have done that would require them to proxy the standard API, or block the JSON API.

 

JSON is generally preferred over XML, and cPanel recommends it - http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/XmlApi 

 

Important: The JSON API is much less resource-intensive than the XML API. We highly recommend using the JSON API, especially if performance is important, since it provides much faster results.

 

It's probably in this hosting company's best interest to support the JSON API. Especially with the decline in companies that use WHMCS.

Link to comment
Share on other sites

  • 0

VistaPanel is their own control panel which is given to the resellers' clients, because cPanel is not able to manage a large amount of users and it's not related with it even if someone has created a theme for cPanel that looks like it.

Anyway it seems that they are using the WHM xml-api to communicate with their servers (maybe they have coded it by 0 ) and to let the resellers integrate their clients with billing software, but at the moment only WHMCS seems to be able to support it since WHMCS works also with xml-api.

I thought that your software was compatible too since I read that it supported JSON and XML API but nothing.

Link to comment
Share on other sites

  • 0

VistaPanel is their own control panel which is given to the resellers' clients, because cPanel is not able to manage a large amount of users and it's not related with it even if someone has created a theme for cPanel that looks like it.

Anyway it seems that they are using the WHM xml-api to communicate with their servers (maybe they have coded it by 0 ) and to let the resellers integrate their clients with billing software, but at the moment only WHMCS seems to be able to support it since WHMCS works also with xml-api.

I thought that your software was compatible too since I read that it supported JSON and XML API but nothing.

 

Vistapanel is cPanel with a theme mate. And cPanel is able to which is why they use it (cPanel & WHM are products of cPanel.net). (http://www.cpskins.com/product/12)

 

 

 

VistaPanel cPanel has a clean stylish look and a easy to use jQuery navigation at the top of each page. VistaPanel gives your customers something easy on the eyes and easy to navigate around no matter what page they are on. With thousands of web hosting companies in the market, you need to make your self stand out in the crowd. Our skins are affordable and the best option to change the default look cpanel offers.

Requires cPanel 11.25+ If you are using an older version we can provide download to past versions with no support.

If you have any questions about the entire order process or want a more in-depth look at our skins please visit our demos page.

 

http://www.mycpdemos.com:2082/login/?user=vista&pass=demo123

 

Just to prove that point :) PS: WHM** is rubbish, which is why they support the old outdated API. 

Link to comment
Share on other sites

  • 0

WHMCS happens to work because it's still using the old XML API. Everyone else is using the JSON API since that's what cPanel recommends. It's only a matter of time before cPanel stops supporting the XML API altogether.

 

 

WHM** is rubbish, which is why they support the old outdated API. 

 

I perfectly agree with both of you. WHMCS is also more expensive and I wanted to use indeed your software but unluckily WHMCS is the only one that works with that and I can do anything! Otherwise I have no other way to integrate the clients

 

EDIT: Their latest support reply:

 

Hi there,

This is on the development list, however will be around 1 month till tested out and added.

 

 

Maybe I've finally been able to convince them, thank you very much to all of you!

Link to comment
Share on other sites

  • 0

Maybe I've finally been able to convince them, thank you very much to all of you!

 

That's good news! Keep us updated, if you don't mind.

 

The alternative would be to suggest a different hosting provider. Ones that don't stay on top of things might be vulnerable to attack. For example, there are lots of hosting companies still running vulnerable copies of WHM**, hopefully they are not one of them. I certainly wouldn't trust my information with them otherwise.

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
Answer this question...

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

Loading...
×
×
  • Create New...