Create a read-only WHMCS API role
0seat calls the official WHMCS API with ten actions, all reads. This guide creates the role that allows only those ten actions, the dedicated credentials, then configures and tests the connection from the console. No module to install.
The ten actions, and nothing else
The list is closed in 0seat’s code: an action outside this list is never called, whatever the role allows. The role you create should therefore contain exactly these actions.
- GetClients and GetClientsDetails: find the customer by e-mail address.
- GetClientsProducts and GetClientsDomains: their services and domains, with status and dates.
- GetInvoices and GetInvoice: their invoices, with due date, amount, currency and status.
- GetOrders: their orders and payment status.
- GetTickets: the subject and status of their tickets, never the body.
- GetProducts and GetTLDPricing: your catalogue and per-extension prices, re-read every twelve hours.
Create the role in WHMCS
In the WHMCS admin area, API credentials and their roles are managed under system settings, in the “API Credentials” section. Menu details vary by version; the steps do not.
- Open the API roles tab and create a role named, for example, “0seat read-only”.
- Tick the ten actions above, and no other. In particular, untick any action starting with Add, Update, Delete, Send or Accept.
- Open the credentials tab and generate a new API credential attached to an administrator user, assigning it this role only.
- Note the identifier and the secret: WHMCS shows the secret only once, and 0seat will never show it again either.
- If your WHMCS restricts the API by IP address, add 0seat’s address: ask us for it through the contact form.
Configure the connection in the console
On the space page, the “WHMCS (optional)” section takes the API address, that is your WHMCS address followed by “/includes/api.php”, the identifier and the secret.
- Fill in the API address, the identifier and the secret.
- List the products whose price the assistant may quote, by their exact names in WHMCS, comma-separated; then the domain extensions, and the currency of your prices.
- Click “Test and save”. The console confirms the connection with the number of products and extensions found, and lists the ones it recognised.
- Credentials are encrypted on save and never shown again. To replace them, enter new ones; to remove WHMCS, the dedicated button erases the secrets.
What 0seat does with this access
At drafting time, 0seat finds the customer by the contact’s e-mail address, keeps no account when several match, then reads their services, domains, invoices and orders. Password, postal address and phone fields are stripped in code before any model call. Ticket bodies are not read.
Calls carry an identifiable user agent and are spaced out: an application firewall will see no burst from a generic HTTP client. On an agent’s command, an account summary built by code, with no model text, can be sent to the customer’s address.