Manage2 API Function - Reactivate Expired Licenses

Last modified: March 7, 2023


Description

This function reactivates an account’s expired cPanel license.

Examples

XML

https://manage2.cpanel.net/XMLlicenseReActivate.cgi?liscid=12345

JSON

https://manage2.cpanel.net/XMLlicenseReActivate.cgi?output=json&liscid=12345

YAML

https://manage2.cpanel.net/XMLlicenseReActivate.cgi?output=yaml&liscid=12345

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]", "123456luggage");
$license = $cpl->reactivateLicense(array(
    "liscd"  => "12345",
    "force"  => "0",
    "dryrun" => "1",
    )
);
?>

1
2
3
4
5
6
7
use cPanelLicensing;
my $cpl = new cPanelLicensing('user' => username\@example.com", 'pass' => "123456luggage");
my $licenseid = $licenseManager->reactivateLicense(
    'liscid' => '12345',
    'force'  => '0',
    'dryrun' => '1',
);

<XMLlicenseReActivate licenseid="12345" monthly_price="25.00" price="150.00" reason="Reactivated COMPANY-INTERNAL-VPS license on 192.0.2.0 in the 'ExampleGroup' group." status="1"/>

1
2
3
4
5
6
7
{
    "monthly_price": "25.00",
    "status": 1,
    "reason": "Reactivated COMPANY-INTERNAL-VPS license on 192.0.2.0 in the 'ExampleGroup' group.",
    "price": "150.00",
    "licenseid": "12345"
}

1
2
3
4
5
6
---
monthly_price: '25.00'
status: 1
reason: Reactivated COMPANY-INTERNAL-VPS license on 192.0.2.0 in the 'ExampleGroup' group.
price: '150.00'
licenseid: '12345'

Parameters

This function accepts the following parameters:

Return Type Description Example
liscid string Required
The ID of the license to reactivate. The Manage2 List License Information function returns a list of possible values.
127.0.0.1
force Boolean Whether to force reactivate the license:
  • 1 — Force reactivate the license.
  • 0 — Do not force reactivate the license.
This parameter defaults to 0.
0
dryrun Boolean Whether to show error messages and price information, but not reactivate the license:
  • 1 — Show error messages and price information, but do not reactivate the license.
  • 0 — Reactivate the license.
This parameter defaults to 1.
0

Returns

This function returns the following values:

Return Type
Description
Example
licenseid integer The reactivate license’s ID. 12345
monthly_price numeric The monthly amount of the license, in US dollars. 25.00
price numeric The price amount of the license, in US dollars. 150.00
reason string Information about the license reactivation. Reactivated COMPANY-INTERNAL-VPS license on 192.0.2.0 in the 'ExampleGroup' group.
status Boolean Whether the function succeeded:
  • 1 — Success.
  • 0 — Failure.
1

Additional Documentation