steph.hope Posted April 29, 2021 Share Posted April 29, 2021 I've seen in the topic below that if we need to be able to trigger actions remotely we should create an addon module: Quote If you want to implement a URL that can run custom code, I would recommend using an addon module with the admin area output or client area output functionality: However when I create a module and try to do a request to it using curl I get a redirect to login. Quote ["redirect_url"]=> string(123) "https://[my url]/admin/login.php?redirect=%2Fwhmcs%2Fadmin%2Faddonmodules.php%3Fmodule%3Dcustommodule" How can I get this to work without being redirected? 0 Quote Link to comment Share on other sites More sharing options...
steph.hope Posted April 29, 2021 Author Share Posted April 29, 2021 I also tried using the code from the below topic, but all I ended up with was my IP banned for too many failed logins... 0 Quote Link to comment Share on other sites More sharing options...
steph.hope Posted April 30, 2021 Author Share Posted April 30, 2021 Nevermind, I got it eventually. I had to set in configuration.php $allow_external_login_forms = true; As per here: https://docs.whmcs.com/Linking_to_WHMCS#Integrating_The_Login_Form_into_your_Website 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted April 30, 2021 Share Posted April 30, 2021 Where you trying to access via https://whmcs.example.com/?m=yourAddonName ? Using that URL, you don't need logins and such. It uses the client area output function and so might not be what you want exactly if you want admin stuff. The other way is to use custom pages but it depends on what your end goal is . 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.