API returned HTTP CODE 0. Is the API installed?

Welcome to MagicSpam Pro for cPanel WHM! A better spam protection in an easy to use cPanel WHM Module. Visit here for support, frequently asked questions, wishlists and discussion groups on this great module to make life with cPanel WHM that much simpler.

Moderators: wizard, magicspam

Post Reply
victoriy
Posts: 4
Joined: Mon Jan 15, 2018 3:24 am

API returned HTTP CODE 0. Is the API installed?

Post by victoriy » Mon Jan 15, 2018 3:29 am

Hello.
I have magicspam whm pro and Im trying to create a package. When I do this i got the error: API returned HTTP CODE 0. Is the API installed?

Another thing is about the SYNC button? when I try to sync for all accounts i get the error: An Error Occurred. Policy was not synced

Thanks for while

magicspam
Posts: 1563
Joined: Tue Oct 28, 2008 2:27 pm

Re: API returned HTTP CODE 0. Is the API installed?

Post by magicspam » Mon Jan 15, 2018 5:42 pm

Hello Victoriy,

Thank you for your post.


Just to make sure we understand correctly, the 'Packages' module in the MagicSpam interface is not working correctly - you are not able to add MagicSpam to existing packages, and you are not able to create a new package. Do we understand this correctly? Are existing packages even showing up in this interface?

One of the possible causes of this is if your WHM configuration has been locked down to not accept connections to the whostmgrd from localhost (127.0.0.1). MagicSpam makes requests to the 'localhost' version of the host manager:

https://localhost:2087/<path to api call>

to interact with the cPanel system. IF the system is locked down, then it is not able to perform this interaction. This can be checked in the WHM Security Center / Host Access Control for top level lock downs. If you have a firewall in place, instructions will of course vary.

Another possible cause is if the name 'localhost' does not resolve to an address (eg: 127.0.0.1). This can be remediated by updating your /etc/hosts file with an entry like:

127.0.0.1 localhost.localdomain localhost


Another possible cause is if you have configured the WHM panel to listen on a different port than the default 2087. If this is the case, we do not have a current 'supported' work around, though we can definitely work with you to devise one.

And a final potential cause is your system does not have the 'curl' binary available at /usr/bin/curl - or if it is not executable or otherwise locked down by additional security systems such as SELinux.


We hope this information helps in your troubleshooting. Let us know if we can offer any further assistance, and we look forward to hearing back from you.

Thanks!
-- MagicSpam Support Team --

victoriy
Posts: 4
Joined: Mon Jan 15, 2018 3:24 am

Re: API returned HTTP CODE 0. Is the API installed?

Post by victoriy » Fri Jan 19, 2018 8:46 am

Hello.
Thanks for the information but I see im using a version where's not compatible with the product WHM v68.0.26.
In the API section now we have to generate an API KEY.

Thanks, anothers controls work fine

magicspam
Posts: 1563
Joined: Tue Oct 28, 2008 2:27 pm

Re: API returned HTTP CODE 0. Is the API installed?

Post by magicspam » Fri Jan 19, 2018 4:22 pm

Hello Victoriy,

It appears that you have resolve the issue with a newly generated API key.

However, would you clarify this for us?

Code: Select all

"I see im using a version where's not compatible with the product WHM v68.0.26.
In the API section now we have to generate an API KEY."
-- Which product' and its version are you referring to?

Please also confirm that MagicSpam is all working correctly in your server.


Thank you.
-- MagicSpam Support Team --

victoriy
Posts: 4
Joined: Mon Jan 15, 2018 3:24 am

Re: API returned HTTP CODE 0. Is the API installed?

Post by victoriy » Tue Jan 23, 2018 6:16 am

Hello.
Im not resolve the issue, i just compare the version of my WHM and the compatible version and its not match.

My WHM/cPanel server is v68.0.27. Its no compatible right? But the antispam works fine except the SYNC (to users) and PACKAGE.

magicspam
Posts: 1563
Joined: Tue Oct 28, 2008 2:27 pm

Re: API returned HTTP CODE 0. Is the API installed?

Post by magicspam » Tue Jan 23, 2018 3:25 pm

Hello Victoriy,

Thank you for your post.

MagicSpam is compatible with your current WHM version.

In order to resolve this issue, could you please try the following:

Go to the Manage API Tokens page in the WHM/cPanel interface and generate a new token.

Once you have generated the new token, please copy and paste the token into

/etc/magicspam/.authtoken

Please let us know if this resolves the issue or if you need any further assistance.
-- MagicSpam Support Team --

Post Reply

Return to “MagicSpam Pro for WHM/cPanel”

Who is online

Users browsing this forum: No registered users and 2 guests