-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Hello,
I tried to use the module but every time I got
is not a function
My code:
var whmcs_client = new WHMCS(config);
const parameters = {
limitstart: 0,
limitnum: 10
};whmcs_client.users.getUsers(parameters)
.then(details => {
console.log(details);
})
.catch(err => {
console.log(err);
});
The error:
whmcs_client.users.getUsers(parameters)
^TypeError: Cannot read properties of undefined (reading 'getUsers')
at Object. (D:\GitHub Rep\WebStrom Projects\BTCPayDetection\whmcsInteraction.js:19:20)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47
What is wrong with my code?