Get Virtualizor

VNC Password

Use VNC Password API to set new VNC password of VPS on your server.

HTTP Request

https://hostname:4083/index.php?act=vncpass&svs=vid

Parameters

NameTypeValueDescriptionRequired
actGETvncpassThe action specified to return data. ** (FOR KVM)**Yes
svsPOSTIntThe vps whose vnc password needs to be changed. This will be passed to the urlYes
vidPOSTIntThe vpsid whose VNC password needs to be changed. This will be passed as a POST parameterYes
vncpassPOSTvncpassThe new password that needs to be changedYes
confPOSTconfConfirming the entered passwordYes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3384;
    $pass = 'tesfher';

    $output = $admin->vncpass($vid, $pass);

    print_r(json_encode($output));
?>

Curl

curl -k -X POST -d "vncpass=1&newpass=testawc&conf=testawc" 
-L "https://hostname:4083/index.php?act=vncpass&svs=3577&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"

Output

{
    "uid": "321",
    "act": "vncpass",
    "timezone": 1,
    "timenow": "September 23, 2016, 6:58 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Change VNC Password",
    "done": {
        "msg": "Your VNC Password has been changed successfully."
    },
    "time_taken": "0.259"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list