Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where can I find the callback url? #26

Open
123ysys opened this issue May 6, 2023 · 9 comments
Open

Where can I find the callback url? #26

123ysys opened this issue May 6, 2023 · 9 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@123ysys
Copy link

123ysys commented May 6, 2023

Hello. I was trying to set the API with WHMCS. When I click the "Refresh" button of the MOFH server on the "Servers" page, the WHMCS returned this error tip:

Error
Not Found
The requested URL /json-api/batch.php was not found on this server.

So I dived into the API Documents and see if I missed something. Then I was confused with the Callback URL. How can I find it? Should I create a callback file and put them into my WHMCS folder first? Also, what is the absolute path of "/json-api/batch.php"? Should it be the "http://panel.myownfreehost.net/" or my WHMCS domain?

Thank you.

@Wallvon Wallvon added help wanted Extra attention is needed question Further information is requested labels May 6, 2023
@Wallvon
Copy link
Owner

Wallvon commented May 6, 2023

Hi there,

Sadly, I don't have experience with the WHMCS addon module, so I can't help you with that. However, https://myownfreehost.net/cpanel-api.php should provide you with enough information. If that doesn't help either, I'd suggest contacting iFastNet support over at https://support.ifastnet.com since it could be that a WHMCS update broke the module, or there is some configuration error on your end. Next to that, https://panel.myownfreehost.net/json-api/ENDPOINT_HERE would be correct, however, batch.php isn't a valid endpoint it seems.

As for the callback URL, that should point to a webserver you host yourself that accepts the form values of https://api.myownfreehost.net/initial-setup/callbacks#hosting-account-callbacks and https://api.myownfreehost.net/initial-setup/callbacks#ticketing-system-callbacks respectively. These are application/x-www-form-urlencoded values, so you would get them the same way as you would get data from an HTML form.

I hope this helps, and if you have any other questions don't hesitate to send another reply.

Best regards,
Robert S.

@123ysys
Copy link
Author

123ysys commented May 6, 2023

Hi there,

Sadly, I don't have experience with the WHMCS addon module, so I can't help you with that. However, https://myownfreehost.net/cpanel-api.php should provide you with enough information. If that doesn't help either, I'd suggest contacting iFastNet support over at https://support.ifastnet.com since it could be that a WHMCS update broke the module, or there is some configuration error on your end. Next to that, https://panel.myownfreehost.net/json-api/ENDPOINT_HERE would be correct, however, batch.php isn't a valid endpoint it seems.

As for the callback URL, that should point to a webserver you host yourself that accepts the form values of https://api.myownfreehost.net/initial-setup/callbacks#hosting-account-callbacks and https://api.myownfreehost.net/initial-setup/callbacks#ticketing-system-callbacks respectively. These are application/x-www-form-urlencoded values, so you would get them the same way as you would get data from an HTML form.

I hope this helps, and if you have any other questions don't hesitate to send another reply.

Best regards, Robert S.

Thank you for these information. All this information is what I have found before opening the issue and infast has stated that they will not provide support for API issues. I'm afraid I won't get anywhere, but I'd like to ask anyway, I saw a video example online where it has whmcs installed on the cpanel panel, and mine is not. Could this be the reason for the failure?

@Wallvon
Copy link
Owner

Wallvon commented May 9, 2023

[...] I saw a video example online where it has whmcs installed on the cpanel panel, and mine is not. Could this be the reason for the failure?

No, the control panel that WHMCS is installed on shouldn't matter.

Your issues may be because of a WHMCS update, or because you set the module up incorrectly. Make sure to follow the instructions on https://myownfreehost.net/cpanel-api.php and https://api.myownfreehost.net/initial-setup/add-allowed-ip.

If that doesn't help I'll try to make some time to set up a WHMCS development instance and see if I can recreate this issue.

Best regards,
Robert S.

@123ysys
Copy link
Author

123ysys commented May 9, 2023

Thank you for replying.

Your issues may be because of a WHMCS update, or because you set the module up incorrectly. Make sure to follow the instructions on https://myownfreehost.net/cpanel-api.php and https://api.myownfreehost.net/initial-setup/add-allowed-ip.

Sure I followed the two tutorials you mentioned at the beginning. I also asked the WHMCS support team to help, and they think maybe it is because the API endpoints miss on the cPanel server, which caused the 404 error. It's terrible that Ifastnet doesn't assist with API-related problems, otherwise, I can find the right roles for looking for help.

If that doesn't help I'll try to make some time to set up a WHMCS development instance and see if I can recreate this issue.

I found the documents are really old and outdated, so yeah, thank you for considering updating them, it is important.

@Wallvon
Copy link
Owner

Wallvon commented May 9, 2023

I also asked the WHMCS support team to help, and they think maybe it is because the API endpoints miss on the cPanel server, which caused the 404 error.

Do keep in mind that vPanel is not cPanel, and that although they share similarities (mainly the theme of the panel, which is mostly a custom-built mess made with Angular, and parts of the API), they really aren't alike. And I doubt that WHMCS has ever worked with vPanel.

@123ysys
Copy link
Author

123ysys commented May 9, 2023

No matter vPanel is or is not cPanel, and no matter if Whmcs has ever worked with vPanel. The tutorial of this link https://myownfreehost.net/cpanel-api.php[https://myownfreehost.net/cpanel-api.php](https://myownfreehost.net/cpanel-api.php) are showing the cases of cPanel instead of vPanel, isn't it. So I have no reasons to ask whmcs about the clues of vPanel.

@4yx
Copy link
Contributor

4yx commented May 31, 2023

The requested URL /json-api/batch.php was not found on this server.

I had a look at this, and it seems that WHMCS may be trying to call this:
https://api.docs.cpanel.net/openapi/whm/operation/batch/

Unfortunately, as MOFH's API isn't the WHM API, it doesn't seem to have the batch function implemented, so whatever WHMCS is trying to do, likely won't work. If it works fine without it, you can ignore this issue. If not, then perhaps the newer versions of WHMCS are no longer compatible with MOFH.

I'm not sure if this would be any help, but if MOFH's tutorial is outdated, this one may be more updated: https://aavidtutorials.com/mofh/how-to-setup-whmcs-with-myownfreehost/

@Wallvon
Copy link
Owner

Wallvon commented Dec 13, 2023

Hey @123ysys, did this ever get resolved? If not, I could ask iFastNet to look into this.

I also never got around to creating a WHMCS development instance, and I also don't qualify for a development license I'm afraid. 😅

@123ysys
Copy link
Author

123ysys commented Dec 14, 2023

Hey @123ysys, did this ever get resolved? If not, I could ask iFastNet to look into this.

I also never got around to creating a WHMCS development instance, and I also don't qualify for a development license I'm afraid. 😅

No. Since the problem seems has no suitable way to solve and the support documents are really outdated, I didn't spend any time on this.
If you are willing to contact iFast for help, I thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants