wellconnit Posted February 3, 2018 Share Posted February 3, 2018 Hi All, I've been looking for a while to find a solution to how I can display users files in a remote API session. Just wondering if anyone has any experience accessing the database across the remote API, I'd rather not write into the page credentials to access the DB, as secure as it may be. As the API seems to have a few gaps in functionality, I'm planning on running SELECT * FROM `tblclientsfiles` WHERE userid = apiuserid Which will give me the information I need to display links to each of the files and their titles. Any help or examples on how to interface with the DB is much appreciated. Link to comment Share on other sites More sharing options...
twhiting9275 Posted February 3, 2018 Share Posted February 3, 2018 Sadly, there's just no way to run an SQL query via API that I'm aware of. Of course, someone can correct me if I'm wrong, but I don't believe this is possible. The point of the API is to do most of the work for you without having to get into the code itself (sql/php) In this case, you'd need to manage all of this remotely Link to comment Share on other sites More sharing options...
wellconnit Posted February 3, 2018 Author Share Posted February 3, 2018 Hi, Yeah I understand the point of the API, however unfortunately with WHMCS making the decision to remove all custom API's and there being no default API to retrieve the files that are listed on a clients account, i'm forced to start looking for alternate ways to extract the data. Unless you know how to activate custom API's on the newer versions of WHMCS? In terms of the SQL access I was thinking even maybe just doing a html include on a file that had the DB credentials so that I don't need to store them in an additional spot incase the credentials change or the installation moves I won't have to worry about updating multiple locations. Link to comment Share on other sites More sharing options...
Recommended Posts