CINXE.COM

<!DOCTYPE html> <html prefix="og: http://ogp.me/ns#" lang="en"> <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="da52fc49-8e48-42b7-9ad3-c219404f6f92" async type="text/javascript"></script> <head itemscope itemtype="https://docs.cpanel.net/"> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><title itemprop="name">Guide to the Manage2 API | cPanel &amp; WHM Documentation</title> <meta property="og:title" content="Guide to the Manage2 API | cPanel &amp; WHM Documentation" /> <meta name="twitter:title" content="Guide to the Manage2 API | cPanel &amp; WHM Documentation" /> <meta itemprop="name" content="Guide to the Manage2 API | cPanel &amp; WHM Documentation" /> <meta name="application-name" content="Guide to the Manage2 API | cPanel &amp; WHM Documentation" /> <meta property="og:site_name" content="cPanel &amp; WHM Documentation" /> <meta name="description" content="The Manage2 API automates cPanel license management procedures." /> <meta itemprop="description" content="The Manage2 API automates cPanel license management procedures." /> <meta property="og:description" content="The Manage2 API automates cPanel license management procedures." /> <meta name="twitter:description" content="The Manage2 API automates cPanel license management procedures." /> <base href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/"> <link rel="canonical" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/" itemprop="url" /> <meta name="url" content="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/" /> <meta name="twitter:url" content="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/" /> <meta property="og:url" content="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/" /> <meta property="og:locale" content="en"> <meta name="language" content="English"> <link rel="alternate" hreflang="en" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/" title="English"> <link rel="sitemap" type="application/xml" title="Sitemap" href="https://docs.cpanel.net/sitemap.xml" /> <meta name='zd-site-verification' content='52kvy6fgdxk6v2yn98k0by' /> <meta property="og:type" content="article" /> <meta name="news_keywords" content="[manage2 m2api]" /> <meta property="article:section" content="[manage2 m2api]" /> <script defer type="application/ld+json"> { "@context": "http://schema.org", "@type": "Article", "headline": "Guide to the Manage2 API", "author": { "@type": "Person", "name": "" }, "datePublished": "0001-01-01", "description": "The Manage2 API automates cPanel license management procedures.", "wordCount": 530 , "mainEntityOfPage": "True", "dateModified": "2022-07-27", "image": { "@type": "imageObject", "url": "" }, "publisher": { "@type": "Organization", "name": "cPanel \u0026 WHM Documentation", "logo": { "@type": "imageObject", "url": "https://www.example.com/images/brand/favicon.png" } } } </script> <link rel=icon href=https://docs.cpanel.net/img/favicon.png> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,800|Open+Sans:400,700,800" rel="stylesheet"> <link href="https://docs.cpanel.net/css/fontawesome_all.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://docs.cpanel.net/css/bootstrap-css/bootstrap.min.css"> <link rel="stylesheet" href="https://docs.cpanel.net/css/prism_dark.min.css"> <link rel="stylesheet" href="https://docs.cpanel.net/sass/main.min.css"> <script data-cookieconsent="ignore" src="https://docs.cpanel.net/js/jquery-3.4.1.min.js"></script> <script src="https://docs.cpanel.net/js/popper-1.16.0.min.js"></script> <script src="https://docs.cpanel.net/js/bootstrap-js/bootstrap.bundle.min.js"></script> <script src="https://docs.cpanel.net/js/search.js"></script> <script src="https://docs.cpanel.net/js/prism.min.js" ></script> <body><nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="container"> <a class="navbar-brand" href="https://docs.cpanel.net/"> <img src="https://docs.cpanel.net/img/docs-logo.min.svg" alt="cPanel logo"> </a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon "></span> </button> <div class="collapse navbar-collapse" id="navbarResponsive"> <ul class="navbar-nav ml-auto"> <li class=" nav-item"> <a class="nav-link" href="https://docs.cpanel.net/release-notes/">Release Notes</a> </li> <li class=" nav-item"> <a class="nav-link" href="https://docs.cpanel.net/changelogs/">Change Logs</a> </li> <li class=" nav-item"> <a class="nav-link" href="https://forums.cpanel.net/" target="_blank" rel="noopener">Forums</a> </li> <li class=" nav-item"> <a class="nav-link" href="https://tickets.cpanel.net/review/login.cgi" target="_blank" rel="noopener">Support Ticket</a> </li> <li class="nav-item"> <a class="btn btn-secondary" href="https://cpanel.net/products/trial/" target="_blank" rel="noopener">Try Demo</a> </li> </ul> </div> </div> </nav> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-KJG3H4L');</script> <div id="content"> <div class="article-container container-fluid"><form id="search-form" name="search-form"> <select class="custom-select d-md-none mt-4 mb-3"> <option value="all" selected>All</option> <option value="cpanel">cPanel</option> <option value="whm">WHM</option> <option value="ea4">EA4</option> <option value="knowledge-base">Knowledge Base</option> <option value="manage2">Manage2</option> <option value="webmail">Webmail</option> <option value="api">API</option> </select> <div class="input-group"> <div class="input-group-append d-none d-md-inline"> <select name="product" class="custom-select"> <option value="all" selected>All</option> <option value="cpanel">cPanel</option> <option value="whm">WHM</option> <option value="ea4">EA4</option> <option value="knowledge-base">Knowledge Base</option> <option value="manage2">Manage2</option> <option value="webmail">Webmail</option> <option value="api">API</option> </select> </div> <input id="search-query" name="q" type="text" class="form-control" placeholder="Enter search terms" aria-label="Default" aria-describedby="inputGroup-sizing-default" required /> <div class="input-group-append" id="search-btn-container"> <input type="submit" formaction="https://docs.cpanel.net//search" value="Search" class="input-group-text" id="submit-search-btn"> </div> </div> </form><ol class="d-none d-md-flex breadcrumb"> <li class="breadcrumb-item" > <a href="https://docs.cpanel.net/">cPanel &amp; WHM Documentation</a> </li> <li class="breadcrumb-item" > <a href="https://docs.cpanel.net/manage2/">Manage2</a> </li> <li class="breadcrumb-item" > <a href="https://docs.cpanel.net/manage2/knowledge-base/">Knowledge Base</a> </li> <li class="breadcrumb-item active" aria-current="page" > Guide to the Manage2 API </li> </ol> <div class="tags"> <a href="https://docs.cpanel.net/tags/manage2/" class="badge badge-primary">manage2</a> <a href="https://docs.cpanel.net/tags/m2api/" class="badge badge-primary">m2api</a> </div><div class="row"> <div class="d-none d-md-block col-md-3"> <aside class="side-nav sticky"> <h4 class="mt-1">Table of Contents</h4> <div class="table-of-contents-wrapper"> <ul class="toc-list"> <a class="bigger-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#overview"> <li>Overview</li> </a> <hr /> <a class="bigger-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#basic-usage"> <li>Basic usage</li> </a> <hr /> <a class="smaller-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#browser-based-calls"> <li>Browser-based calls</li> </a> <hr /> <a class="smaller-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#the-cpanellicensing-php-class"> <li>The cPanelLicensing PHP class</li> </a> <hr /> <a class="smaller-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#the-cpanellicensing-perl-module"> <li>The cPanelLicensing Perl module</li> </a> <hr /> <a class="smaller-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#curl"> <li>cURL</li> </a> <hr /> </ul> </div> <div id="wasThisHelpful" class="was-this-helpful-block alert alert-info fade" style="display:none"> <div id="wasHelpfulSection" class="collapse show wth-section"> <p class="wthb-description">Did you find this document helpful?</p> <div class="wthb-buttons"> <a href="javascript:void(0)" class="wthb-button wthb-yes" id="wasHelpfulBtn_yes" onClick="hideWasThisHelpful()"> <span class="sr-only">Yes</span> <i aria-hidden="true" class="fas fa-thumbs-up"></i> </a> <a href="javascript:void(0)" class="wthb-button wthb-no" id="wasHelpfulBtn_no" onClick="showFeedbackSection()"> <span class="sr-only">No</span> <i aria-hidden="true" class="fas fa-thumbs-down"></i> </a> </div> </div> <div id="giveFeedbackSection" class="collapse wth-feedback-section"> <div id="tf" style="width:100%;height:600px"></div> <link rel="stylesheet" href="//embed.typeform.com/next/css/widget.css" /> <script src="//embed.typeform.com/next/embed.js"></script> <script> window.tf.createWidget('B6wowWDL', { container: document.getElementById('tf'), hidden: { url_form: window.location.href } }); </script> </div> <script src="https://docs.cpanel.net/js/wasThisHelpful.min.js"></script> </div> </aside> </div> <div class="d-xs-block d-md-none col-md-3"> <aside class="side-nav sticky"> <a class="link" data-toggle="collapse" href="#table-of-contents-toggle" role="button" aria-expanded="false" aria-controls="table-of-contents-toggle"> <h4 class="mt-1">Table of Contents</h4> </a> <div class="collapse" id="table-of-contents-toggle"> <div class="table-of-contents-wrapper"> <ul class="toc-list"> <a class="bigger-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#overview"> <li>Overview</li> </a> <hr /> <a class="bigger-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#basic-usage"> <li>Basic usage</li> </a> <hr /> <a class="smaller-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#browser-based-calls"> <li>Browser-based calls</li> </a> <hr /> <a class="smaller-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#the-cpanellicensing-php-class"> <li>The cPanelLicensing PHP class</li> </a> <hr /> <a class="smaller-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#the-cpanellicensing-perl-module"> <li>The cPanelLicensing Perl module</li> </a> <hr /> <a class="smaller-TOC" href="https://docs.cpanel.net/manage2/knowledge-base/guide-to-the-manage2-api/#curl"> <li>cURL</li> </a> <hr /> </ul> </div> </div> </aside> </div> <div class="col-md-9"> <div class="flex-column flex-md-row article-header"> <div style="display:flex;align-items:center;padding-bottom:10px"><h2 style="padding-right:10px;">Guide to the Manage2 API</h2></div> </div> <p>Last modified: <em>July 27, 2022</em></p> <hr /> <h2 id="overview">Overview</h2> <p>The Manage2 API automates cPanel license management procedures. For example, you can use the Manage2 API to <a href="https://docs.cpanel.net/manage2/api/manage2-api-reactivate-expired-licenses">reactivate your cPanel licenses</a>.</p> <div class="callout callout-warning"> <div class="callout-heading">Important:</div> <div class="callout-content"> <p>You <strong>must</strong> authenticate with the proper permissions to call a function. Add the IP address from which to call the function to the Manage2 profile in Manage2&rsquo;s <a href="https://docs.cpanel.net/manage2/security/add-an-access-ip"><em>Add an Access IP</em></a> interface (<em>Manage2 &raquo; Dashboard &raquo; Security &raquo; Add an Access IP</em>).</p> </div> </div> <p>For a list of available Manage2 API functions, read our <a href="https://docs.cpanel.net/manage2/api">Manage2 API documentation</a>.</p> <h4 id="manage2-api-basic-information">Manage2 API basic information</h4> <ul> <li><strong>Languages</strong> — PHP, Perl</li> <li><strong>Methods</strong> — GET, POST</li> <li><strong>Return Formats</strong> — XML, JSON, YAML</li> </ul> <h2 id="basic-usage">Basic usage</h2> <p>You can access Manage2&rsquo;s API functions with the following methods:</p> <h3 id="browser-based-calls">Browser-based calls</h3> <p>You can access Manage2 API functions directly from any web browser when you call a function from a Manage2 session. For example:</p> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-BASH" data-lang="BASH"><span style="display:flex;"><span>https://manage2.cpanel.net/XMLlicenseReActivate.cgi?output<span style="color:#f92672">=</span>json&amp;liscid<span style="color:#f92672">=</span><span style="color:#ae81ff">12345</span></span></span></code></pre></div> <p>This example uses the following variables:</p> <table> <thead> <tr> <th>Variable</th> <th>Description</th> <th>Example</th> </tr> </thead> <tbody> <tr> <td><code>function</code></td> <td>The Manage2 API function.</td> <td><code>XMLlicenseReActivate</code></td> </tr> <tr> <td><code>output</code></td> <td> <div class="callout callout-info"> <div class="callout-heading">Note:</div> <div class="callout-content"> This variable is optional. </div> </div> The template for the <a href="https://docs.cpanel.net/manage2/knowledge-base/manage2-return-data">return data</a>, in <code>output=style</code> format: <ul><li><code>json</code> — JSON output.</li><li><code>yaml</code> — YAML output.</ul> The Manage2 API returns XML output by default.</td> <td><code>output=json</code></td> </tr> <tr> <td><code>parameter</code></td> <td>The parameters passed to the function, in <code>parameter=value</code> format.</td> <td><code>liscid</code></td> </tr> <tr> <td><code>value</code></td> <td>The parameter&rsquo;s value.</td> <td><code>12345</code></td> </tr> </tbody> </table> <h4 id="browser-session-url-call-parts">Browser session URL call parts</h4> <p>Browser-based Manage2 API calls resemble the following example:</p> <p><img src="https://docs.cpanel.net/img/m2-browser-session-url-calls.png" alt="A diagram of a Manage2 browser session URL call"></p> <p>Browser-based Manage2 API calls consist of the following basic parts:</p> <table> <thead> <tr> <th>Part</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><em>Server</em></td> <td>The HTTP address of the Manage2 account.</td> </tr> <tr> <td><em>Function</em></td> <td>The Manage2 API function name, followed by a question mark (<code>?</code>) character.</td> </tr> <tr> <td><em>Output</em></td> <td>The function&rsquo;s output style. For more information, read our <a href="https://docs.cpanel.net/manage2/knowledge-base/manage2-return-data">Manage2 Return Data</a> documentation.</td> </tr> <tr> <td><em>Parameters and values</em></td> <td>The function&rsquo;s parameters and their values.</td> </tr> </tbody> </table> <h3 id="the-cpanellicensing-php-class">The cPanelLicensing PHP class</h3> <p>You can access Manage2 API functions via the <a href="https://docs.cpanel.net/manage2/knowledge-base/cpanellicensing-php-class"><code>cPanelLicensing</code> PHP class</a>:</p> <div class="highlight"><div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"> <table style="border-spacing:0;padding:0;margin:0;border:0;"><tr><td style="vertical-align:top;padding:0;margin:0;border:0;"> <pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">5 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">6 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">7 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">8 </span></code></pre></td> <td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"> <pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-PHP" data-lang="PHP"><span style="display:flex;"><span><span style="color:#f92672">&lt;?</span><span style="color:#a6e22e">php</span> </span></span><span style="display:flex;"><span><span style="color:#66d9ef">include</span>(<span style="color:#e6db74">&#34;cpl.inc.php&#34;</span>); </span></span><span style="display:flex;"><span>$cpl <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">cPanelLicensing</span>(<span style="color:#e6db74">&#34;<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="23565046514d424e4663465b424e534f460d404c4e">[email&#160;protected]</a>&#34;</span>, <span style="color:#e6db74">&#34;123456luggage&#34;</span>); </span></span><span style="display:flex;"><span>$license <span style="color:#f92672">=</span> $cpl<span style="color:#f92672">-&gt;</span><span style="color:#a6e22e">reactivateLicense</span>(<span style="color:#66d9ef">array</span>( </span></span><span style="display:flex;"><span> <span style="color:#e6db74">&#34;liscd&#34;</span> <span style="color:#f92672">=&gt;</span> <span style="color:#e6db74">&#34;12345&#34;</span> </span></span><span style="display:flex;"><span> ) </span></span><span style="display:flex;"><span>); </span></span><span style="display:flex;"><span><span style="color:#75715e">?&gt;</span><span style="color:#960050;background-color:#1e0010"> </span></span></span></code></pre></td></tr></table> </div> </div> <div class="callout callout-warning"> <div class="callout-heading">Important:</div> <div class="callout-content"> <p>You <strong>must</strong> pass the username (for example, <code><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="384d4b5d4a5659555d785d40595548545d165b5755">[email&#160;protected]</a></code>) and password (for example, <code>123456luggage</code>) when you instantiate the PHP class.</p> </div> </div> <p>This example uses the following variables:</p> <table> <thead> <tr> <th>Variable</th> <th>Description</th> <th>Example</th> </tr> </thead> <tbody> <tr> <td><code>function</code></td> <td>The Manage2 API function name.</td> <td><code>reactivateLicense</code></td> </tr> <tr> <td><code>parameter</code></td> <td>The parameters that you pass to the function, in <code>parameter=value</code> format.</td> <td><code>&quot;liscid&quot;</code></td> </tr> <tr> <td><code>value</code></td> <td>The parameter&rsquo;s value.</td> <td><code>&quot;12346&quot;</code></td> </tr> </tbody> </table> <h3 id="the-cpanellicensing-perl-module">The cPanelLicensing Perl module</h3> <p>You can access Manage2 API functions via the <a href="https://docs.cpanel.net/manage2/knowledge-base/cpanellicensing-perl-module"><code>cPanelLicensing</code> Perl module</a>:</p> <div class="highlight"><div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"> <table style="border-spacing:0;padding:0;margin:0;border:0;"><tr><td style="vertical-align:top;padding:0;margin:0;border:0;"> <pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4 </span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">5 </span></code></pre></td> <td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"> <pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-Perl" data-lang="Perl"><span style="display:flex;"><span><span style="color:#66d9ef">use</span> cPanelLicensing; </span></span><span style="display:flex;"><span><span style="color:#66d9ef">my</span> $cpl <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> cPanelLicensing(<span style="color:#e6db74">&#39;user&#39;</span> <span style="color:#f92672">=&gt;</span> <span style="color:#e6db74">&#34;username\@example.com&#34;</span>, <span style="color:#e6db74">&#39;pass&#39;</span> <span style="color:#f92672">=&gt;</span> <span style="color:#e6db74">&#34;123456luggage&#34;</span>); </span></span><span style="display:flex;"><span><span style="color:#66d9ef">my</span> $licenseid <span style="color:#f92672">=</span> $licenseManager<span style="color:#f92672">-&gt;</span>reactivateLicense( </span></span><span style="display:flex;"><span> <span style="color:#e6db74">&#39;liscid&#39;</span> <span style="color:#f92672">=&gt;</span> <span style="color:#e6db74">&#39;12345&#39;</span> </span></span><span style="display:flex;"><span>);</span></span></code></pre></td></tr></table> </div> </div> <div class="callout callout-warning"> <div class="callout-heading">Important:</div> <div class="callout-content"> <p>You <strong>must</strong> pass the username (for example, <code><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8cf9ffe9fee2ede1e9cce9f4ede1fce0e9a2efe3e1">[email&#160;protected]</a></code>) and password (for example, <code>123456luggage</code>) to the module when you instantiate the Perl class.</p> </div> </div> <p>This example uses the following variables:</p> <table> <thead> <tr> <th>Variable</th> <th>Description</th> <th>Example</th> </tr> </thead> <tbody> <tr> <td><code>function</code></td> <td>The Manage2 API function name.</td> <td><code>reactivateLicense</code></td> </tr> <tr> <td><code>parameter</code></td> <td>The parameters that you pass to the function, in <code>parameter=value</code> format.</td> <td><code>'liscid'</code></td> </tr> <tr> <td><code>value</code></td> <td>The parameter&rsquo;s value.</td> <td><code>'12345'</code></td> </tr> </tbody> </table> <h3 id="curl">cURL</h3> <p>You can access Manage2 API functions via the <a href="https://en.wikipedia.org/wiki/CURL" target="_blank">cURL</a> command line tool:</p> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-BASH" data-lang="BASH"><span style="display:flex;"><span>curl <span style="color:#e6db74">&#39;https://manage2.cpanel.net/XMLlicenseReActivate.cgi?output=json&amp;liscid=12345&#39;</span></span></span></code></pre></div> <p>You can also include the function and variables in separate strings, separated by the data (<code>-d</code>) flag. For example:</p> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-BASH" data-lang="BASH"><span style="display:flex;"><span>curl <span style="color:#e6db74">&#39;https://manage2.cpanel.net/XMLlicenseReActivate.cgi&#39;</span> -d <span style="color:#e6db74">&#39;output=json&amp;liscid=12345&#39;</span></span></span></code></pre></div> <div class="callout callout-warning"> <div class="callout-heading">Important:</div> <div class="callout-content"> <p>The system <strong>ignores</strong> any variables that you pass in the string <strong>before</strong> the <code>-d</code> flag. For example:</p> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-BASH" data-lang="BASH"><span style="display:flex;"><span>curl <span style="color:#e6db74">&#39;https://manage2.cpanel.net/XMLlicenseReActivate.cgi?output=json&#39;</span> -d <span style="color:#e6db74">&#39;liscid=12345&#39;</span></span></span></code></pre></div> <p>If you attempt to call the function in this format, the system ignores the <code>output=json</code> variable.</p> </div> </div> </div> </div> <section class="mt-5"> <h4>Additional Documentation</h4> <hr> <div class="additional-documentation"> <ul> <li> <a href="https://docs.cpanel.net/manage2/knowledge-base/manage2-return-data/">Manage2 Return Data</a> </li> <li> <a href="https://docs.cpanel.net/manage2/knowledge-base/cpanellicensing-perl-module/">cPanelLicensing Perl Module</a> </li> <li> <a href="https://docs.cpanel.net/manage2/knowledge-base/cpanellicensing-php-class/">cPanelLicensing PHP Class</a> </li> <li> <a href="https://docs.cpanel.net/manage2/knowledge-base/manage2-authentication-methods/">Manage2 Authentication Methods</a> </li> <li> <a href="https://docs.cpanel.net/manage2/api/manage2-api-add-group/">Manage2 API Function - Add Group</a> </li> <li> <a href="https://docs.cpanel.net/knowledge-base/cpanel-product/cpanel-glossary/">The cPanel Glossary</a> </li> </ul> </div> </section> </div> </div> <footer class="text-center mt-0"> <div class="container"> <div class="row"> <div class="col-md-1"> <a href="//cpanel.com" title="WebPros International, LLC" class="center-block cPanel-logo"> <img src="https://docs.cpanel.net/img/cpanel-logo.min.svg" title="WebPros International, LLC"/> </a> </div> <div class="col-md-11 legal"> <p class="small"> &copy; 2024 All Rights Reserved / <a href="//cpanel.com/legal-notices.html" target="_blank" rel="noopener" title="Legal Notices">Legal Notices</a> / <a href="//cpanel.com/privacy-policy.html" target="_blank" rel="noopener" title="Privacy Policy">Privacy Policy</a> / <a href="//cpanel.com/transparency-report.html" target="_blank" rel="noopener" title="Transparency Report">Transparency Report</a> </p> </div> </div> </div> <div class="container-fluid trademark"> <div class="row"> <div class="col-sm-12 text-center"> <small>cPanel, WebHost Manager, and WHM are registered trademarks of WebPros International, LLC for providing its computer software that facilitates the management and configuration of internet web servers.</small> </div> </div> </div> </footer> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'8e901e18fb34ce16',t:'MTczMjY4OTUzMC4wMDAwMDA='};var a=document.createElement('script');a.nonce='';a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script></body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10