📌 Purpose & Quick Summary
Automated billing and provisioning are the backbone of a successful hosting business. The API Manager (index.php?page=api_manager) enables you to generate cryptographically signed REST API access tokens. You can integrate your BoostonCP reseller account with WHMCS, HostBill, or custom CRM systems to automate client account creation, package upgrades, suspensions, and terminations upon invoice payment.
Figure 7: Developer API Manager for provisioning REST API tokens and WHMCS billing integration.
🖥️ Interface Tour & Elements
- API Token Generator: Form to create scoped access tokens with custom expiration dates and descriptions.
- WHMCS Module Configuration: Pre-formatted server connection credentials (API Hostname, Reseller Access Key, Port 2085).
- IP Access Whitelist: Security constraint restricting API execution strictly to your billing server's dedicated IP address.
- Active Tokens Ledger: Table listing active API keys, creation dates, last-used timestamps, and Revoke controls.
🛠️ Step-by-Step Instructions
Step 1: Generating a WHMCS API Token
- In the sidebar, click API Manager (icon:
fa-code). - Click Generate New API Token.
- In Token Label, enter
WHMCS Billing Server. - Under Allowed IP Addresses, enter your WHMCS web server IP to prevent unauthorized requests.
- Click Generate Token and copy the resulting cryptographic secret.
Step 2: Configuring the WHMCS Server Module
- In your WHMCS Admin Area, navigate to System Settings -> Servers -> Add New Server.
- Select BoostonCP Reseller Module (or cPanel compatible mode).
- In Hostname / IP, enter
server.boostonserver.com(or your reseller hostname). - In Username, enter your Reseller ID.
- In Password / API Token, paste the token generated in Step 1.
- Click Test Connection. A green checkmark confirms automated provisioning is active.
⚙️ Complete Field & Parameter Reference Table
| API Field | Value | Purpose |
|---|---|---|
| API Endpoint | https://server.boostonserver.com:2085/api/ |
Base URL for RESTful JSON calls. |
| Header | Authorization: Bearer <token> |
Token passed with every automated request. |
| Whitelisted IP | IPv4 address | Rejects all API calls originating from unrecognized IP addresses. |
❓ Troubleshooting & Common Errors
1. WHMCS Returns "401 Unauthorized"
- Cause: Typo in API token or billing server IP address changed without updating the whitelist.
- Solution: Verify that your billing server's current IP address matches the IP whitelist in the API Manager.