Skip to main content

CPanel API - How to get Security Token "cpsess##########" using webrequest/HttpClient in C#

Comments

2 comments

  • cPRex Jurassic Moderator
    Hey there! The best information I have for this will be found here:
    0
  • Alan_Scott
    CPanel API - How to get Security Token "cpsess##########" using webrequest/HttpClient in C# Using Cpanel API - Authentication username password

    The first way is to use the cPanel API. To do this, you will need to send a POST request to the /login page of the cPanel server. The body of the request should contain the following JSON: [QUOTE]{"cpanel_jsonapi_user":"your_cpanel_username","cpanel_jsonapi_module":"CPanel","cpanel_jsonapi_func":"get_security_token","cpanel_jsonapi_version":2}
    The response from the server will be a JSON object containing the security token.
    0

Please sign in to leave a comment.