Cpanel API Digest

Hello every one! Let’s eat some tricks…


Cpanel Security token

“Security token” URLs were added in cPanel & WHM 11.25 as a security measure, and they were enabled by default in version 11.28. They help combat a common type of attack called a Cross-Site Request Forgery (XSRF).

So, what does a “security token” look like? Take, for example, this URL:

With security tokens enabled, this would become:

The token is available in the environment variable ‘cp_security_token’.

my $APIurl = "$ENV{'cp_security_token'}/xml-api/$url";

Find more information click here.





Leave a Reply

Your email address will not be published. Required fields are marked *