Get Virtualizor
License

This API wizard will help you to add the License to Virtualizor in case of Private License (i.e. Desktop License) Or Lifetime License. Private license key for your internal network can be obtained from our support(support@softaculous.com). Lifetime license can be directly purchased from our client center.

After getting the license key you will need to add the license key using this API. The API response will contain "done" as "Updated License Key" on successful update of the license key. Calling the API function without any parameters will return the details of the current Virtualizor license.

Only licenses of private networks and lifetime license can be updated via this API

HTTP Request

https://hostname:4085/index.php?act=license

Parameters

NameMethodValueDescriptionRequired
actGETlicenseThe action specified to perform operation and retrieve dataYes
licformPOSTIntThe value should be 1 for updating the license keyYes
lickeyPOSTtextThe license key to be updated should be of the form 'VIRTD-XXXXX-XXXXX-XXXXX-XXXXX'/'VIRTE-XXXXX-XXXXX-XXXXX-XXXXX'Yes
refreshlicensePOST1/0Pass this as 1 for refreshing the licenseNo

Sample Code

<?php

    require_once('/usr/local/virtualizor/sdk/admin.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $post = array();
    $post['licform'] = 1;
    $post['lickey'] = 'VIRTD-XXXXX-XXXXX-XXXXX-XXXXX';

    $output = $admin->license($post);

    print_r(json_encode($output));
?>  

Output

{
    "title": "License Information",
    "info": {
        "path": "/usr/local/virtualizor",
        "slave": 0,
        "masterkey": "",
        "masterip": "",
        "key": "lf6klmphhpyrxqacmuebs2ioxlzrc37g",
        "pass": "ti3thxss38v8jj6cybhwdc1xvghyetob",
        "kernel": "kvm",
        "lv": "",
        "thin_lv": "",
        "disk_path": "",
        "dbhost": "localhost",
        "db": "virtualizor",
        "dbuser": "root",
        "dbpass": "25etajy45w",
        "sn": "API Virt",
        "cookie_name": "SIMCookies3042",
        "gzip": 0,
        "cpu_nm": 0,
        "overcommit": 0,
        "language": "english",
        "soft_email": "ali@virtualizor.com",
        "theme_folder": "default",
        "timezone": "0",
        "update": 2,
        "email_update": 0,
        "email_update_client": 0,
        "cron_time": "18 16 * * 3",
        "emps_cron_time": "18 16 * * 3",
        "logo_url": "",
        "logo_login_url": "",
        "mail": 0,
        "mail_server": "mail_server",
        "mail_port": 25,
        "mail_user": "test@test.com",
        "mail_pass": "test",
        "mail_smtp_secure": 0,
        "mail_debug": 0,
        "mail_connect_timeout": 0,
        "off": 0,
        "off_subject": "",
        "off_message": "",
        "admin_logs": 2,
        "vps_logs": 2,
        "login_logs": 2,
        "system_logs": 2,
        "status_logs": 7,
        "bandwidth_logs": 0,
        "sess_len": 30000,
        "copyright": "",
        "interface": "",
        "xen_pvbridge": "",
        "xen_hvmbridge": "",
        "xen_dom0mem": 0,
        "use_xl": "",
        "ipadd": "",
        "netmask": "",
        "gateway": "",
        "ip6add": "",
        "gateway6": "",
        "int_bridge": "",
        "int_ipadd": "",
        "int_netmask": "",
        "login_attempts": 5,
        "login_ban_time": 15,
        "alert_load_limit": 0,
        "alert_disk_limit": 0,
        "vswap": 0,
        "noc_apikey": "",
        "noc_apipass": "",
        "disable_webuzo": 0,
        "disabled_scripts": "",
        "disable_icons_monitor": 0,
        "disable_icons_cp": 0,
        "disable_email": 0,
        "node_bandwidth": 0,
        "vps_bandwidth_threshold": 0,
        "change_ssh_port": 0,
        "max_ssh_login": 0,
        "vnc_ip": "192.168.1.240",
        "ping_ip": "",
        "distro": "",
        "dhcp_interface": "",
        "support": "",
        "addvs_io_class": "",
        "addvs_io_prio": "",
        "addvs_cpu_prio": "",
        "vpslimit": "",
        "ploop": 0,
        "enable_tuntap_cp": 0,
        "enable_ppp_cp": 0,
        "enable_fuse_cp": 0,
        "enable_ipip_cp": 0,
        "enable_ipgre_cp": 0,
        "enable_nfs_cp": 0,
        "enable_quotaugidlimit_cp": 0,
        "enable_iolimit_cp": 0,
        "enable_iopslimit_cp": 0,
        "enable_enduser_vnc": 0,
        "show_server": 0,
        "band_suspend": 0,
        "speed_cap_disable": 0,
        "is_master_only": 0,
        "xcp_lv_prefix": "",
        "novnc": 1,
        "novnc_master_only": 0,
        "novnc_server_name": 0,
        "queue_creation": 0,
        "disable_dd_flags": 0,
        "dbbackup_email": "ali@virtualizor.com",
        "dbbackup_cron": "1 * * * *",
        "dbbackup_type": "EMAIL",
        "dbbackup_server": 0,
        "dbbackup_server_dir": "",
        "is_cloud": "",
        "bridge": "viifbr0",
        "pv_on_hvm": 0,
        "band_calc_creation": 0,
        "no_ebtables_on_plans": "",
        "master_name": "",
        "inodes_gb": "",
        "openvz_suspend_load": 0,
        "disable_login_logo": 0,
        "enable_rdns": 0,
        "disable_backup_cp": 0,
        "auto_add_zone": 0,
        "enable_console": 0,
        "curl_timeout": "",
        "del_novps_user": 0,
        "del_slave_ostemplate": 0,
        "disable_master_vpsname": 0,
        "showsearch": 0,
        "site_domain": "",
        "use_new_theme": "",
        "turnon_virtdf": "",
        "disable_newtheme": 0,
        "disable_recipes": 0,
        "enable_virtio": 0,
        "disable_suspend_email": 0,
        "enable_idsort": 0,
        "del_tasks": 0,
        "disable_apicredential": 0,
        "disable_rescue": 0,
        "disable_change_hostname": 0,
        "disable_change_password": 0,
        "disable_vps_config": 0,
        "disable_os_reinstall": 0,
        "disable_ssh": 0,
        "disable_java_vnc": 0,
        "disable_self_shutdown": 0,
        "disable_server_location": 0,
        "disable_enduser_sshkeys": 0,
        "disable_vga": 0,
        "enable_nic": 0,
        "cb_hash": "oidzotex0av7rueyzonhnbn7nokndmgd",
        "enable_cb": 0,
        "cb_use_https": 0,
        "cb_url": "",
        "cb_suspend": 0,
        "cb_unsuspend": 0,
        "cb_hostname": 0,
        "cb_terminate": 0,
        "cb_changeips": 0,
        "cb_login_whmcs_user": "",
        "default_sg_name": "",
        "default_sg_reseller_name": "",
        "default_sg_desc": "",
        "custom_mac": "",
        "cloud_allow_virtio": 0,
        "le_primary_domain": "hostname",
        "le_contact_email": "test@test.com",
        "le_key_size": "2048",
        "le_renew_days": 80,
        "le_staging": 0,
        "le_enable_force": 1,
        "2fa_email_otp": 0,
        "enable_2fa": 0,
        "eu_allow_virtio": 0,
        "keep_orphan_template": 0,
        "pass_strength": 0,
        "haproxy_enable": 1,
        "haproxy_src_ips": "192.168.1.240",
        "haproxy_reservedports": "",
        "haproxy_reservedports_http": "80,443",
        "haproxy_allowedports": "",
        "haproxy_cron_logs": 0,
        "backup_queue": 0,
        "restore_queue": 0,
        "server_latitude": 0,
        "server_longitude": 0,
        "disable_nw_config": 0,
        "enable_eu_iso": 1,
        "eu_iso_size": 5120,
        "eu_iso_limit": 3,
        "eu_iso_space": 5120,
        "eu_iso_del_hr": 0,
        "secure_allowed_ips": "",
        "backup_email": "",
        "backup_disable_success_mail": 0,
        "disable_virttop": 0,
        "set_def_hvm": 0,
        "memory_limit": 0,
        "proxmox_server_pass": "",
        "proxmox_server_name": "",
        "proxmox_server_pass_salt": "",
        "max_ips": 250,
        "cp_url": "http://google.com",
        "inhouse_billing": 1,
        "enable_registration": 0,
        "user_pass_min_char": 0,
        "support_email": "ali@virt.com",
        "default_uplid": 0,
        "billing_warn_bal": 80,
        "billing_currency": "USD",
        "billing_symbol": "$",
        "billing_min": 35,
        "billing_max": 55,
        "billing_day": 0,
        "billing_comp": "billingcompamny",
        "billing_addr1": "billing company address",
        "billing_addr2": "",
        "captcha_secret": "",
        "captcha_sitekey": "",
        "resource_pricing": "{\"space\":{\"h_rate\":{\"-1\":32},\"m_rate\":{\"-1\":12},\"y_rate\":{\"-1\":12}},\"cores\":{\"h_rate\":{\"-1\":30},\"m_rate\":{\"-1\":30},\"y_rate\":{\"-1\":30}},\"ram\":{\"h_rate\":{\"-1\":30},\"m_rate\":{\"-1\":30},\"y_rate\":{\"-1\":30}},\"ips\":{\"h_rate\":{\"-1\":23},\"m_rate\":{\"-1\":12},\"y_rate\":{\"-1\":32}},\"bandwidth\":{\"h_rate\":{\"-1\":23}}}",
        "recipe_shell": "#!/bin/sh",
        "hf_loaded": 0,
        "charset": "UTF-8",
        "showntimetaken": 1,
        "version": "2.9.8",
        "patch": "0",
        "license": "VIRTD-81008-78272-55853-14018",
        "port": 4082,
        "vpsid": 0,
        "index": "index.php?",
        "server": 0,
        "queries": 0,
        "docs": "https://www.virtualizor.com/wiki/",
        "apiurl": "https://api.virtualizor.com/",
        "openvzos": "/vz/template/cache",
        "xenos": "/var/virtualizor/xen",
        "kvmos": "/var/virtualizor/kvm",
        "xcpos": "/var/virtualizor/xcp",
        "lxcos": "/var/virtualizor/lxc",
        "proxoos": "/var/virtualizor/proxo",
        "proxkos": "/var/virtualizor/proxk",
        "proxlos": "/var/virtualizor/proxl",
        "vzoos": "/vz/template/cache",
        "vzkos": "/var/virtualizor/vzk",
        "isos": "/var/virtualizor/iso",
        "euisos": "/var/virtualizor/euiso",
        "virtualboxos": "/var/virtualizor/virtualbox",
        "var": "/var/virtualizor",
        "lxc_path": "/var/lib/lxc/",
        "virts": {
            "openvz": "openvz",
            "xen": "xen",
            "xenhvm": "xenhvm",
            "kvm": "kvm",
            "xcp": "xcp",
            "xcphvm": "xcphvm",
            "lxc": "lxc",
            "proxo": "proxo",
            "proxk": "proxk",
            "proxl": "proxl",
            "vzk": "vzk",
            "vzo": "vzo"
        },
        "mainfiles": "/usr/local/virtualizor/main",
        "adminfiles": "/usr/local/virtualizor/admin",
        "themes": "/usr/local/virtualizor/enduser/themes",
        "runtime_theme": "api",
        "kernelfiles": "/usr/local/virtualizor/kernel",
        "webuzo_scripts": "/var/virtualizor/webuzo_scripts",
        "_disabled_scripts": [],
        "notupdated_task": 3600,
        "os": "linux",
        "com": {
            "vgdisplay": "/sbin/vgdisplay",
            "lvdisplay": "/sbin/lvdisplay",
            "lvscan": "/sbin/lvscan",
            "lvcreate": "/sbin/lvcreate",
            "lvremove": "/sbin/lvremove",
            "resizefs": "/sbin/resize2fs",
            "php": "/usr/local/emps/bin/php",
            "pgzip": "/bin/gzip"
        },
        "vcores": 0,
        "resource_types": [
            "space",
            "cores",
            "ram",
            "ips"
        ],
        "HTTP_HOST": "192.168.1.240",
        "lictype": "-1",
        "lictype_txt": "Trial",
        "active": 1,
        "active_txt": "Active",
        "licnumvs": "0",
        "primary_ip": "127.127.127.1",
        "licexpires": "20181231",
        "licexpires_txt": "31/12/2018 GMT",
        "last_edit": "1538379498",
        "fast_mirrors": [
            "https://s1.softaculous.com/a/virtualizor",
            "https://s2.softaculous.com/a/virtualizor",
            "https://s3.softaculous.com/a/virtualizor",
            "https://s4.softaculous.com/a/virtualizor",
            "https://s7.softaculous.com/a/virtualizor"
        ],
        "pgtimezone": 0,
        "apicall": "jepcfalu",
        "apidata": [],
        "SERVER_ADDR": "192.168.1.240"
    },
    "done": "Updated License Key",

    "timenow": 1540373645,
    "time_taken": "1.230"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list