Skip to content

swenz/whmcs-api

 
 

Repository files navigation

WHMCS API C# Wrapper

This is an library to comunicate with the WHMCS API
Currently these functions are already implemented

Donate

How to install
NuGet Packet Manager Console on VisualStudio Install-Package WHMCS_API
or
Releases project page (need to also download Newtonsoft.Json if not already included on your project)

The implemented functions are designed to be very easy to use The following code demonstrates to to implement the GetClientDetails on an ASP.net MVC app
More information on the project Wiki Getting Started

using WHMCS-API;
namespace YOUR_APP
{
    public class YOUR_CLASS
    {
        [HttpPost]
        public ActionResult ClientDetails(int clientID)
        {
            string username = "WHMCS_USERNAME";
            string password = "WHMCS_PASSWORD";
            string accessKey = "WHNMCS_ACCESS_KEY";
            string whmcsUrl = "WHMCS_USERFRONTEND_URL"; //ex: https://example.com/client
            API api = new API(username, password, accessKey, whmcsUrl);
            ViewBag.UserDetails = api.GetClientsDetails(clientID, Stats: true); //The model passed is of type GetClientsDetails
            return View();
        }
    }
}

You can still use this library to call non implemented
Read more at the project Wiki [Advanced Usage] Unsuported Actions

You can also create custom functions of already implemented functions.
Read more at the project Wiki [Advanced Usage] Supported Actions

Donate

About

An WHMCS API C# Wrapper

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%