Skip to content

DamageESP/whmcs-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WHMCS Node Module

This module allows you to remotely manage your WHMCS installation(s) using Node.

Installation

npm install whmcs-js

Usage

Reminder: You need to whitelist the IP from which you are making API calls in WHMCS. Otherwise you will get an error.

You can do this under Setup > General Settings > Security. More info

Configuring

You can remotely identify on the API using two methods: Note that you will always need to declare serverUrl

With username and password

const config = {
  username: 'api_username',
  password: 'password_as_md5',
  serverUrl: 'http://127.0.0.1/includes/api.php' // Remember to point to the api.php file
}

With identifier and secret

You can generate these under Setup > Staff Management > Manage API Credentials. More info

const config = {
  identifier: 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzz',
  secret: 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzz',
  serverUrl: 'http://127.0.0.1/includes/api.php' // Remember to point to the api.php file
}

Making calls

Every request returns a Promise with JSON data, so you can do:

const { Billing } = require('whmcs-js')

const myBilling = new Billing(config)

const invoices = await myBilling.getInvoices()

Available Modules

See a list of available Modules and their methods here: https://damageesp.github.io/whmcs-js/

License

Víctor Campos - @DamageESP

Licensed under the Apache license, version 2.0 (the "license"); You may not use this file except in compliance with the license. You may obtain a copy of the license at:

http://www.apache.org/licenses/LICENSE-2.0.html

Unless required by applicable law or agreed to in writing, software distributed under the license is distributed on an "as is" basis, without warranties or conditions of any kind, either express or implied. See the license for the specific language governing permissions and limitations under the license.

The contents in this repository are based on the repository node-whmcs, which is licensed under the Apache license, version 2.0 by Pedro Dias - @pedromdias, but include major modifications to it.

Original repository: https://github.com/apocas/node-whmcs

About

🚀 Remotely manage your WHMCS installation(s) using Node.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published