Jump to content

Search the Community

Showing results for tags 'api'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • The latest WHMCS Release
    • WHMCS 8.2 Release Discussion Board
  • WHMCS Beta Program
    • WHMCS Mobile App Technical Preview Feedback
  • The Latest from the WHMCS Team
    • News, Announcements & Blogs from WHMCS
  • WHMCS.Community
    • Community Announcements
    • Introduce Yourself
  • Using WHMCS
    • Pre-Sales Questions
    • Admin & Configuration Questions
    • Installation, Upgrade, and Import Support
    • Using WHMCS
    • Troubleshooting Issues
    • Vendor Discussions
  • WHMCS Showcase
    • Showcase Your Site
    • Share Your Best Practices & Tips
  • Developing & Extending WHMCS
    • Third Party Add-ons
    • Service Offers & Requests
    • Developer Corner
    • Building Modules
    • Share Ideas for WHMCS Modules
  • Community Competitions
    • Competitions
  • General Discussions
    • General Discussion
  • General Feedback & Assistance
    • Feedback
    • WHMCS.Community Tips & Tricks
  • Third Party Developers's Topics
  • Turkish International Discussions's Topics
  • Russian International Discussions's Topics
  • Spanish International Discussions's Topics
  • Portuguese International Discussions's Topics
  • French International Discussions's Topics
  • Italian International Discussions's Topics
  • German International Discussions's Topics
  • WHMCS Brasil's Topics
  • WHMCS Brasil's Tópicos
  • ModulesGarden Club's Topics
  • Hungarian International Discussions's Segítség
  • ThemeMetro Club's Topics
  • WHMCS Services Club's Topics
  • WHMCS Global Services Club's Topics
  • Katamaze's Free Scripts
  • Katamaze's Modules
  • Zomex Club's Topics
  • 0100Dev Club's Topics

WHMCS Version

  • V8.2.x Hotfixes
  • V8.1.x Hotfixes
  • V8.0.x Hotfixes
  • V7.10.x Hotfixes
  • V7.9.x Hotfixes

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 51 results

  1. Hi, I want to send a ticket reply to the client using API. when I use the AddTicketReply the new replay is added to the ticket - as if the client sent us a reply, But I want to send the reply to the client. Can you please advise what is the API command / documentation to send a reply to the client from the ticket (not an email - but with the ticket, it is just like the AddTicketReply is working but from us to the client and not fro, the client to us). Thanks! Ram
  2. Hello, I am having a problem with the "eNom" domain registry. Basically I tried to connect with the API everything is functional but when I want to switch to "Test mode" I have this error message: "Bad User name or Password Your changes have not been saved." However, I followed the tutorial on this page to put it in Test mode: https://docs.whmcs.com/Enom Thanks in advance to everyone who will help me
  3. while working with the api I realized that getproducts (https://developers.whmcs.com/api-reference/getproducts/) does not bring up the field to know if the product is active or not. I saw someone post a similar idea several years ago: so with a little engineer I made my own version of getproducts and uploaded it to /includes/api/ Request Parameters "GetProductsActive" Parameter Type Description Required action string “GetProductsActive” Required pid int string Obtain a specific product id configuration. Can be a list of ids comma separated gid int Retrieve products in a specific group id Optional Response Parameters Parameter Type Description result string The result of the operation: success or error totalresults int The total number of results available startnumber int The starting number for the returned results numreturned int The number of results returned products array An array of products matching the criteria passed I will leave the file called: getproductsactive.php however this may throw an api error, you have to give access in the table tblapi_roles in database, in the field: permissions add: ,"getproductsactive": 1 before closing }, This modification is due to WHMCS not showing the files added in includes/api as a role. (I do not know why). With this you can get the field: hidden which defines 0 if it is visible and 1 if it is hidden. (true or false also works) my code is a copy of includes/api/getproduct.php just add to show the hidden field (, "hidden" => $data["hidden"]), this would have been easier if WHMCS implemented it, it only took me 2 minutes to show this field. <?php if (!defined("WHMCS")) { exit("This file cannot be accessed directly"); } if (!function_exists("getCustomFields")) { require ROOTDIR . "/includes/customfieldfunctions.php"; } if (!function_exists("getCartConfigOptions")) { require ROOTDIR . "/includes/configoptionsfunctions.php"; } global $currency; $currency = getCurrency(); $pid = $whmcs->get_req_var("pid"); $gid = $whmcs->get_req_var("gid"); $module = $whmcs->get_req_var("module"); $where = array(); if ($pid) { if (is_numeric($pid)) { $where[] = "tblproducts.id=" . (int) $pid; } else { $pids = array(); foreach (explode(",", $pid) as $p) { $p = (int) trim($p); if ($p) { $pids[] = $p; } } if ($pids) { $where[] = "tblproducts.id IN (" . implode(",", $pids) . ")"; } } } if ($gid) { $where[] = "gid=" . (int) $gid; } if ($module && preg_match("/^[a-zA-Z0-9_\\.\\-]*\$/", $module)) { $where[] = "servertype='" . db_escape_string($module) . "'"; } $result = select_query("tblproducts", "tblproducts.*", implode(" AND ", $where), "tblproductgroups`.`order` ASC, `tblproductgroups`.`id` ASC, `tblproducts`.`order` ASC, `tblproducts`.`id", "ASC", "", "tblproductgroups ON tblproducts.gid = tblproductgroups.id"); $apiresults = array("result" => "success", "totalresults" => mysql_num_rows($result)); while ($data = mysql_fetch_array($result)) { $pid = $data["id"]; $productarray = array("pid" => $data["id"], "gid" => $data["gid"], "type" => $data["type"], "name" => $data["name"], "description" => $data["description"], "module" => $data["servertype"], "paytype" => $data["paytype"], "hidden" => $data["hidden"]); if ($language = $whmcs->get_req_var("language")) { $productarray["translated_name"] = WHMCS\Product\Product::getProductName($data["id"], $data["name"], $language); $productarray["translated_description"] = WHMCS\Product\Product::getProductDescription($data["id"], $data["description"], $language); } if ($data["stockcontrol"]) { $productarray["stockcontrol"] = "true"; $productarray["stocklevel"] = $data["qty"]; } $result2 = select_query("tblpricing", "tblcurrencies.code,tblcurrencies.prefix,tblcurrencies.suffix,tblpricing.msetupfee,tblpricing.qsetupfee,tblpricing.ssetupfee,tblpricing.asetupfee,tblpricing.bsetupfee,tblpricing.tsetupfee,tblpricing.monthly,tblpricing.quarterly,tblpricing.semiannually,tblpricing.annually,tblpricing.biennially,tblpricing.triennially", array("type" => "product", "relid" => $pid), "code", "ASC", "", "tblcurrencies ON tblcurrencies.id=tblpricing.currency"); while ($data = mysql_fetch_assoc($result2)) { $code = $data["code"]; unset($data["code"]); $productarray["pricing"][$code] = $data; } $customfieldsdata = array(); $customfields = getCustomFields("product", $pid, "", "", "on"); foreach ($customfields as $field) { $customfieldsdata[] = array("id" => $field["id"], "name" => $field["name"], "description" => $field["description"], "required" => $field["required"]); } $productarray["customfields"]["customfield"] = $customfieldsdata; $configoptiondata = array(); $configurableoptions = getCartConfigOptions($pid, array(), "", "", "", true); foreach ($configurableoptions as $option) { $options = array(); foreach ($option["options"] as $op) { $pricing = array(); $result4 = select_query("tblpricing", "code,msetupfee,qsetupfee,ssetupfee,asetupfee,bsetupfee,tsetupfee,monthly,quarterly,semiannually,annually,biennially,triennially", array("type" => "configoptions", "relid" => $op["id"]), "", "", "", "tblcurrencies ON tblcurrencies.id=tblpricing.currency"); while ($oppricing = mysql_fetch_assoc($result4)) { $currcode = $oppricing["code"]; unset($oppricing["code"]); $pricing[$currcode] = $oppricing; } $options["option"][] = array("id" => $op["id"], "name" => $op["name"], "rawName" => $op["rawName"], "recurring" => $op["recurring"], "required" => $op["required"], "pricing" => $pricing); } $configoptiondata[] = array("id" => $option["id"], "name" => $option["optionname"], "type" => $option["optiontype"], "options" => $options); } $productarray["configoptions"]["configoption"] = $configoptiondata; $apiresults["products"]["product"][] = $productarray; } $responsetype = "xml"; ?> Hope this helps others to show the field they need to show files and hidden products. getproductsactive.php
  4. Is it possible to get the domain addon prices through the API? GetTLDPricing does not give this information. Thanks in advance. Kevin Sheahan
  5. Hello. I want to be able to add pay methods through the API, but the functionality seems to be broken. I can successfully use AddPayMethod through both the localAPI and also the external API. $command = 'AddPayMethod'; $data = [ 'clientid' => 490, 'type' => 'RemoteCreditCard', 'gateway_name' => 'stripe', 'card_number' => '4111111111111111', 'card_expiry' => '0320', 'set_as_default' => '1', ]; // { // result: "success", // clientid: 490, // paymethodid: 52 // } The pay method then appears in the database in tblpaymethods, albeit with wrong payment_type and no gateway_name. HOWEVER, then calling GetPayMethod retrieves no results: $command = 'GetPayMethods'; $data = [ 'clientid' => 490, ]; // { // result: "success", // clientid: 490, // paymethods: [ ] // } And there are no pay methods in the WHMCS dashboard for this client. NOTE: I have tried this with all kinds of permutations of real credit card numbers (rather than the test cc#, shown above), and also using type: 'CrediCard' and no gateway_name. The results are always the same. The API says, result: 'success', and it saves it to the DB table, but GetPayMethods never returns anything, and the actual WHMCS dashboard shows no pay methods for that client. If I manually add a PayMethod via the WHMCS dashboard, then that will appear in the results for GetPayMethods. How am I supposed to add a PayMethod via API? Thank you, Scott
  6. Hello I'm trying to update client with the API but I'm getting this error "{"result":"error","message":"Identity is required"}" The admin user of the API has API Access and Manage API Credentials roles. The IP of the server has been added to API IP Access Restriction and the Whitelist $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://xxxxxxxxxxx/includes/api.php'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( array( 'action' => 'UpdateClient', 'identifier' => $api_identifier, 'secret' => $api_secret, 'clientid' => 3, 'customfields' => base64_encode(serialize( [ "CR/ID copy" => 'https://xxxxxxxxx.xxx/uploads/?file=xxxxxx', ] )), 'responsetype' => 'json', ) ) ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close($ch); Thanks.
  7. I have dreamscape registrar module in my WHMCS. unfortunately, am not able to understand the causes of the following error. the hosting server is OK with SOAP and have no issues with rest of the SOAP running. I have also spoke to registrar but they are also unable to understand rectify the error. the url is publicly accessible and has no issues with it. Could someone has the similar issue ? Registrar Error Failed to get domain details: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://soap.secureapi.com.au/wsdl/API-2.0.wsdl' : failed to load external entity "http://soap.secureapi.com.au/wsdl/API-2.0.wsdl"
  8. Hello, I'm working on a python script and i'd like to insert customfields on the updateclient call. This is a json of tblcustomfields {"id":"2","type":"client","relid":"0","fieldname":"status","fieldtype":"dropdown","description":"","fieldoptions":"notVerified,verified","regexpr":"","adminonly":"on","required":"","showorder":"","showinvoice":"","sortorder":"0","created_at":"0000-00-00 00:00:00","updated_at":"0000-00-00 00:00:00"}, tblcustomfieldsvalues {"id":"5","fieldid":"2","relid":"297","value":"verified","created_at":"2019-11-05 04:38:50","updated_at":"2019-11-05 04:38:50"}, {"id":"6","fieldid":"3","relid":"297","value":"","created_at":"2019-11-05 04:38:50","updated_at":"2019-11-05 04:38:50"}, {"id":"7","fieldid":"4","relid":"297","value":"","created_at":"2019-11-05 04:38:50","updated_at":"2019-11-05 04:38:50"}, {"id":"8","fieldid":"6","relid":"297","value":"","created_at":"2019-11-05 04:38:50","updated_at":"2019-11-05 04:38:50"} Now when it comes to pushing the data, the documentation isn't clear. All i'm seeing is; customfields|string|Base64 encoded serialized array of custom field values|Optional Based on web searching, its not getting clearer. Here is a snipped of my last code. cstatus = { "fieldid": "2", "value": "verified" } encoded = base64.b64encode(b'cstatus') with requests.Session() as session_whmcs_bounces: session_whmcs_bounces.headers.update(whmcs_auth) whmcs_bounces_payload = { 'identifier': whmcs_ident, 'secret': whmcs_secret, 'responsetype': whmcs_response, 'action': "UpdateClient", 'clientemail': email, 'status': "Inactive", 'marketingoptin': 0, 'notes': '--- Bounces ---\nCreated: %s\nStatus: %s\nReason: %s\n---Bounces---' % (timeconvert,status,reason), 'customfields': encoded } i tried using the json.dumps/json.loads techniques to serialize the data, but in my mind i don't have to since the data is already serialized, i just have to encode it. I also tried variations, as in just the ID and value { "2": "verified" } / { "id": "2", "value": "verified" } and different combinations. Been at it for a few hours and can't seem to find much information. Ideally i'd like to update multiple sections based on the json reply. The flow i'm trying to achieve is this; Receive client information from datasource. { "email": "example@domain.tld", "type": "prospect", "status": "verified", "firstName": "Jon", "lastName": "Wong", "position": "Senior Linux Administrator", "sourcePage": "https:\/\/www.linkedin.com\/in\/jonthewong" } Add it or Update it into WHMCS Use extra fields as customfields. In this case, type/status/position/sourcepage The python code shown is for a separate part of the project, but the customfields base64,serialization still apply. If anyone has any experience or suggestions i'd appreciate it. Thank you. On a side note, I'm using Python 3.7 + requests/time/json/base64/getpass I'm open to adding other libs, but ideally i'd prefer using the ones i already have build for this env.
  9. Hi there! Is there a way to access the variables of a payment gateway? With "GetModuleConfigurationParameters" I get the names of the parameters, but not their variables or content. If you can help me, that would be great !! Thanks in advance!
  10. Hello everyone, Real quick, I installed Namecheap API and configured WHMCS to auto register domains after payment are received. I did several test registrations with some fails and other successful. I’m now getting live registrations from my existing customers and payments go smoothly with no issues, customer even receives the purchase invoice and domain registration confirmation, but on Namecheap side things are really weird. Checking on the modules log I see the ‘response’ for the actual transaction and apparently the API is not using the correct command or method to create and register the domains. It just checks for the domain. And I say really weird because if I perform a manual registration of the same domain my customer is trying to buy, the registration goes though and it’s updated on my Namecheap account as well. I have to do it a couple of times until it works. Any suggestions on how to fix this problem or maybe documentation I can check. I contacted Namecheap support team several times but all the say is that the API is using the wrong command and that I should update the code 😞 Thank you, - ED
  11. Hi, I wrote an PHP utility for importing domains from an old administrative panel. The utility creates new order then confirm it. We were using nicIT for .it domains and ascio for the others tld; all worked fine, A few days ago we added internetbs and now when trying to create the order for .com domains (still managed by ascio) the AddOrder API returns a null response although the order is created and left in 'pending' status. With .it domains still works fine. Any idea ? is it possible to get a sort of log where to look for the reason the API call does not work properly ?
  12. So I recently noticed a weird bug. All of a sudden, I was getting an invalid IP error from the WHMCS API. I checked all my configurations, the IP was in the WHMCS admin panel under Setup > General > Security in the white listed IPs, I even manually checked the database to make sure I wasn't accidentally connected to the old database. After trying what I thought was everything, I rebooted the server, and to my surprise. It fixed the problem. But now, it has happened again, and again, rebooting the server has solved the issue. This has happened twice within the last few hours and I have no idea why. Anyone have any suggestions, locations for error logs, literally anything that helps me figure out why this is happening? Here's a copy of my Health Check if that helps WHMCS Health Check ================================================================================ error: * The system cron does not appear to have completed successfully within the last 24 hours. Check your activity logs or learn more about enabling the cron in our documentation. * Your configuration file is writable. This can be a security risk. We recommend setting the permissions to read only. .trimmed-dir-list li { text-decoration: underline dashed; } The following directories are owned by a different user from that which is executing WHMCS. This indicates a potentially insecure configuration:crons You can learn more about this in our documentation. * Your system is set to display errors. While this is useful for some debugging situations, it can interfere with some operations and is a security risk. For more information please refer to our documentation. warning: * - Automatic Updates require a writeable directory for staging files during an update. You must provide a directory via the Updater Configuration before you can update. * Your PHP memory_limit value 64M is lower than recommended. WHMCS recommends at least a 128M limit, however your value is higher than the minimum requirement of 64M. You can change this in your php.ini with the set_ini command. * Your PHP version 7.2.30 is supported by WHMCS. The PHP 7.2 branch no longer receives regular bug fixes and will only receive critical security updates until it reaches its end of life. Please see our documentation for more information. * The following PHP extensions are recommended for best performance and trouble free operation. While optional for core WHMCS functionality, certain modules and addons may require them to fully function as intended: - soap - xmlrpc - zip Please review the current system recommendations and search our documentation for the specific modules you use to learn more. * We have detected that your WHMCS installation is currently using the default template names for one or more of the active templates. If you have made any customisations, we strongly recommend creating a custom template directory to avoid losing your customisations the next time you upgrade.You are currently using a default template in the following locations: - Cart - Client Area Please review our documentation on making a custom theme for help doing this. notice: * Sensitive directories cannot be accessed from the web. * Your system is setup to not log unnecessary error levels. * Your PHP installation has all extensions loaded and enabled required for WHMCS to operate. * You are using custom paths for all the recommended WHMCS directories. * Your PHP installation has all required functions enabled for WHMCS to operate. * PHP session support is enabled.Session autostart is disabled.The PHP session save path /var/cpanel/php/sessions/ea-php72 is writable. * Your PHP environment uses a valid timezone. * You currently have version 7.70.0 of cURL installed. This version uses a secure cipher list. * cURL reports that it does support SSL * cURL reports that it does support Secure TLS 1.1 and 1.2 * A verified SSL certificate was detected for your site. * You are running MySQL version 5.7.30. This version supports all features required for full compatibility with WHMCS. * Your system is running "Apache" web server.
  13. 1. Over the past years, we have celebrated many diverse milestones with you by our side. Today the moment has come for another sumptuous celebration but this time is somewhat different. This time, our dear clients, it is all about you – your presence, trust and support we have been endowed with at every stage of our software development journey. We are truly humbled for the privilege of being the number one software house for over 25,000 business customers so far!For this rare honor to be celebrated with a due bang, we have decided to make this event all about you. Without further ado, let us invite you to join our joyful promotion launched especially for this memorable occasion consisting of not one, but a pair of delicious treats – 25% price cut for virtually every single module and the possibility to receive $25 for any purchase at ModulesGarden.Uncover the details of these two stunning bargains directly on our Blog!2. Hot off the press: Products Reseller For WHMCSFasten your seatbelts as there is one more extra surprise to top off this week’s news!During the last couple of months, we carefully listened to our customer’s precious feedback and forged ahead with the development of a completely novel module that we have the pleasure to bring to life today – Products Reseller For WHMCS!Following the example of some other module that we offer – Domains Reseller For WHMCS – we aimed at granting web hosting businesses the same freedom and comfort in managing their reselling operations but focused exclusively on products in this instance.Let us take you on a quick sightseeing tour across the module’s functionalities: The possibility to define custom product pricing rates for each reseller group individually and handle all their details right within your WHMCS. Dynamic statistics in the dashboard page summarizing your total income as well as earnings from specific products generated in a chosen time period. Advanced API documentation enabling your resellers to create custom integration submodules to deliver products to end clients by means of any other platform than WHMCS. For further specifics you should definitely hit the blue link below that will take you to the product’s dedicated page in a matter of seconds. Go carefully through the entire changelog and let the module settle in your business routine for good – especially when you can get hold of it for a mere fraction of its total price, only until the end of this week. How? By combining the splendid 15% Early Bird Sale with the ongoing 25k Customers Promotion!Learn all there is to know about Products Reseller For WHMCS!Need Custom Software Development For Your Business? Get Your Free Quote Now! Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
  14. I have been working with the API for a couple months now and am finding that much of the functionality available through the WHMCS dashboard is simply missing in the API. It's as if the functionality available through the API is a limited subset of the functionality available in the dashboard. Can someone please confirm that this is the case? Thank you, Scott
  15. Hi, I want to perform some tasks that require the service id on a hook(specifically invoice creation) the paramters there are limited all I get is the invoice id. Is there a way to fetch service id using that invoice id any indication/help/solution would be highly appreciated. The hook must trigger either before or after invoice generation. Thanks. 👍
  16. Hello, I try this code: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://******/api/includes/api.php'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( [ 'action' => 'GetClients', // See https://developers.whmcs.com/api/authentication 'identifier' => '*****', 'secret' => '*****', 'search' => 'domain', 'responsetype' => 'json', ] ) ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close($ch); var_dump($response); But i get this error: {"result":"error","message":"An admin user is required"} My Ip is listed in Api Alloweds Ips and I have whmcs v7.9.1 Whats is the problem? Thanks, Cesar
  17. Hi guys, In add order api we can't add domain addons to already registered domains, so you must add domain addons to new domains only, is there any way to pass this issue or someone built custom api to fix the problem ? Thanks for help.
  18. dear community member.. hope all doing very well. i am trying to make a module for my VoIP project . one of my friend helping me out in this module. but i dont know what he done something is he can't figure out how to fix. basically its for VoIP project. so we will sell voip service with local city number. so when the ordering time we will select the city and then based on the city name the available numbers will be display.. so for the list of city the api link is https://mydomainname.com/api/city_list.php?&token=123456 this api link display all the city name from remote database so thats i want it to show in one custom field and for the second custom field based on the city name i have another api link which is https://mydomainname.com/api/did_free.php?city=Dublin&token=123456 which shows result this way its only shows the number is dublin city from the remote database. my friend make the module for me. but the way i want its show very right in the customer order form . i mean if customer directly buy from the client area its shows perfect according to city name so when i select the city then i see available numbers based on the city which the way i wanted to see from the client area. so from the client area its works properly no problem. problem with from the admin area when i wanted to setup a product to client from admin in the admin panel i see like this which means its doesn't matter which city i select. but i see all numbers from my remote database. like 35391 is Galway numbers 35314 is Dublin Numbers and 35321 is Cork numbers. they are all showing together. which is very frustrating . here is my hook file code. can some please please tell me where he did wrong? HOOK FILE CODE ======================================== <?php use PDO; use Exception; use PDOException; use WHMCS\Database\Capsule; $host = 'https://mydomainname.com/api/'; $token = '123456'; $ch = curl_init(); $fields = array( 'token' => $token ); curl_setopt($ch, CURLOPT_URL, $host.'city_list.php?'.http_build_query($fields)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $city = curl_exec($ch); curl_close($ch); $packageNames = json_decode($city, true); $citylist = array(); $numberslist = array(); foreach ($packageNames['result'] as $packageName) { $citylist[$packageName['city']] = ucfirst($packageName['city']); $ch = curl_init(); $fields = array( 'city' => $packageName['city'], 'token' => $token ); curl_setopt($ch, CURLOPT_URL, $host.'did_free.php?'.http_build_query($fields)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $numbers = curl_exec($ch); $numbers = json_decode($numbers); $numberslist = array_merge($numbers->result,$numberslist); curl_close($ch); } $citylist = implode($citylist,','); $numberslist = implode($numberslist,','); //echo json_encode(array('cities'=>explode(",",$citylist),'numbers'=>explode(",",$numberslist))); $pdo = Capsule::connection()->getPdo(); try { $result = $pdo->query( "update tblcustomfields set fieldoptions = '".$citylist."' where fieldname = 'City'" ); } catch (\Exception $e) { echo "Uh oh! {$e->getMessage()}"; return $e->getMessage(); } try { $result = $pdo->query( "update tblcustomfields set fieldoptions = '".$numberslist."' where fieldname = 'Available Phone Numbers'" ); } catch (\Exception $e) { echo "Uh oh! {$e->getMessage()}"; return $e->getMessage(); } add_hook('OverrideModuleUsernameGeneration', 1, function($vars) { return $vars['customfields']['Available Phone Numbers']; }); ============================================================= please someone help me to correct the code. please
  19. Hii, We are having an issue of file upload in the support ticket. We are using the cakephp for our platform and also the WHMCS API on our platform for the support and billing. On the platform side when a client sends the attachment with the file size more than 1MB the file uploads in the cloud where we are storing but it doesn't get attached in the ticket from the client-side and on the staff side (WHMCS) the attachment is not receiving. We have checked the server's file upload limit and everything and it looks ok that file upload limit is properly set. The file upload less then 1MB is working fine and our staff are able to receive the attachments. Also, the attachment sending from Staff to client is working fine for even 18MB file size.
  20. Hi I have an issue while Placing an order using API. Placing an order with "Free" billing cycle but order placeed with "Monthly" billing cycle. See https://nimb.ws/KhLHV8 . https://nimb.ws/KvqJiT Product Setting : https://nimb.ws/a9DWBU I tried "free","free-account","Free","Free-Account"..etc... But not working. $postdata = array( 'action' => 'AddOrder', 'clientid' =>10, 'pid' => array('242'), 'noinvoiceemail'=>true, 'priceoverride'=>'0.00', 'noemail'=>true, 'noinvoice'=>true, 'billingcycle' => array('Free'), 'paymentmethod' => 'paypal', 'responsetype' => 'json' ); Regards kan
  21. Hi.. I have been working on this for 4 days now and still not able to find a right solution. i have the get client data using api to display it in other platform but it displays in array form. Since i am new to coding, I need it to display in table form . How am i able to do it ? please help me here the code applied: // API Connection Details $whmcsUrl = "https://domain.com/"; // For WHMCS 7.2 and later, we recommend using an API Authentication Credential pair. // Learn more at http://docs.whmcs.com/API_Authentication_Credentials // Prior to WHMCS 7.2, an admin username and md5 hash of the admin password may be used. $username = "xxxxxxxxxxxxxxxxxxxxxxx"; $password = "yyyyyyyyyyyyyyyyyyyyyyyyy"; // Set post values $postfields = array( 'username' => $username, 'password' => $password, 'action' => 'GetClients', 'responsetype' => 'json', ); // Call the API $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $whmcsUrl . 'includes/api.php'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields)); $response = curl_exec($ch); if (curl_error($ch)) { die('Unable to connect: ' . curl_errno($ch) . ' - ' . curl_error($ch)); } curl_close($ch); // Decode response $jsonData = json_decode($response, true); // Dump array structure for inspection var_dump($jsonData);?> Here is the result: Please help me solve this..Thank you
  22. 1. This is the kind of news we love sharing the most! Our Domains Reseller For WHMCS module has been upgraded to the landmark 2.0 version, thus pioneering a whole new direction in which the tool will be heading from now on. Starting with the spectacular framework redesign, the module embraced also a varied range of new functionalities, including: Possibility to set up different domain pricing rates for individual reseller groups in the module addon Dynamic statistics in admin dashboard summarizing total income plus income from specific TLDs from a chosen time period Advanced API documentation, enabling both admin providers and resellers to create custom submodules Complete overview of reseller details such as TLDs pricing, end users’ orders, or logs now conveniently stored in their own Reseller Area Go carefully through the full changelog and let flexibility settle in your business routine for good! AP Learn more about Domains Reseller For WHMCS 2.0! 2. EasyDCIM - a cutting-edge tool automating daily data center operations, has recently received a solid 1.5.5 update. Among the new utilities administrators are now free to use are the practical tooltips with overview on users and most device types supported by the system, as well as extended features related to QR codes, allowing now to easily label the physical equipment in a server room. Head right over to the official EasyDCIM Blog for extra info! 3. Check out also our other recent module updates: EURid Registrar For WHMCS - 1.2.2 Password Manager For WHMCS - 2.2.5 - 2.2.5 Support Tickets Allocator For WHMCS - 1.3.0 Need Custom Software Development For Your Business? Get Your Free Quote Now! Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
  23. Hello, community! I'm doing some experiments with the API UpdateTransaction but it looks like it is not working with any combination of parameters. I used the required parameter transactionid and tried to update the fee and description, but nothing happens. The API returns success.
  24. Hi All, I've written some PHP to extract client files from the WHMCS database because it's not a native API call. Just opened the thread to share it with anyone who may want to use it. I'm working on another to update the Last Login details also. Create the SQL Connection then Get the Files List - Pass $userID as the clientID - While loop ensures all records are put into the arrary function getfiles($userID) { $conn = new mysqli('DBAddress', 'DBUser', 'DBPW', 'DBName') $result = $conn->query("SELECT * FROM `tblclientsfiles` WHERE userid = $userID"); $rows = array(); while($row = $result->fetch_assoc()) { $rows[] = $row; } return $rows; } $filesData = getfiles($userID); for ($counter = 0; $counter < count($rows); $counter++) { $split = explode("_", $filesData[$counter]['filename']); echo "<tr><td>" . $split['1'] . "</td><td><a href='WHMCSWebsite/attachments" .$filesData[$counter]['filename']. "'>Download</a></td></tr>"; } That should be enough for people to be able to extract the files list and display it through the API.
  25. Hi All, Has anyone successfully worked out a way to generate a forgotten password email from the WHMCS API? It's all good to be able to login to the system but if the user has forgotten their password it's pointless getting them to sign into the WHMCS version of the site when you're using the API to make sure they don't hit that site in the first place? It seems strange that this isn't native to WHMCS already as it aligns with the login process of the normal page? Any help with this is greatly appreciated.. Thanks!
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated