curl --request POST \
--url https://{api_host}/kvm/v2/set/vnc/enable \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data signature=session_signature_12345 \
--data kvm_id=kvm_123456_789012 \
--data valid_until=1737476000 \
--data vnc_pw=securepassword123import requests
url = "https://{api_host}/kvm/v2/set/vnc/enable"
payload = {
"signature": "session_signature_12345",
"kvm_id": "kvm_123456_789012",
"valid_until": "1737476000",
"vnc_pw": "securepassword123"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
signature: 'session_signature_12345',
kvm_id: 'kvm_123456_789012',
valid_until: '1737476000',
vnc_pw: 'securepassword123'
})
};
fetch('https://{api_host}/kvm/v2/set/vnc/enable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api_host}/kvm/v2/set/vnc/enable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&vnc_pw=securepassword123",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{api_host}/kvm/v2/set/vnc/enable"
payload := strings.NewReader("signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&vnc_pw=securepassword123")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{api_host}/kvm/v2/set/vnc/enable")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&vnc_pw=securepassword123")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_host}/kvm/v2/set/vnc/enable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&vnc_pw=securepassword123"
response = http.request(request)
puts response.read_body{
"status": "success",
"vnc_status": "enabled",
"novnc_port": 6080,
"vnc_port": 5901,
"vnc_host": "example.edis.at"
}{
"status": "error",
"error_code": "INVALID_PARAMETERS",
"message": "The 'kvm_id' field is required."
}{
"status": "error",
"error_code": "UNAUTHORIZED",
"message": "Invalid session signature. Please log in again."
}{
"status": "error",
"error_code": "ACCESS_DENIED",
"message": "You do not have permission to perform this action."
}{
"status": "error",
"error_code": "INTERNAL_ERROR",
"message": "An unexpected error occurred. Please try again later."
}Enable VNC
This endpoint enables VNC access for a specified KVM VPS.
The api_host parameter, obtained from the “Create AUTH-session” response,
is dynamically set in the URL.
Provide the signature, kvm_id, valid_until, and vnc_pw parameters to activate VNC.
curl --request POST \
--url https://{api_host}/kvm/v2/set/vnc/enable \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data signature=session_signature_12345 \
--data kvm_id=kvm_123456_789012 \
--data valid_until=1737476000 \
--data vnc_pw=securepassword123import requests
url = "https://{api_host}/kvm/v2/set/vnc/enable"
payload = {
"signature": "session_signature_12345",
"kvm_id": "kvm_123456_789012",
"valid_until": "1737476000",
"vnc_pw": "securepassword123"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
signature: 'session_signature_12345',
kvm_id: 'kvm_123456_789012',
valid_until: '1737476000',
vnc_pw: 'securepassword123'
})
};
fetch('https://{api_host}/kvm/v2/set/vnc/enable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api_host}/kvm/v2/set/vnc/enable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&vnc_pw=securepassword123",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{api_host}/kvm/v2/set/vnc/enable"
payload := strings.NewReader("signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&vnc_pw=securepassword123")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{api_host}/kvm/v2/set/vnc/enable")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&vnc_pw=securepassword123")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_host}/kvm/v2/set/vnc/enable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "signature=session_signature_12345&kvm_id=kvm_123456_789012&valid_until=1737476000&vnc_pw=securepassword123"
response = http.request(request)
puts response.read_body{
"status": "success",
"vnc_status": "enabled",
"novnc_port": 6080,
"vnc_port": 5901,
"vnc_host": "example.edis.at"
}{
"status": "error",
"error_code": "INVALID_PARAMETERS",
"message": "The 'kvm_id' field is required."
}{
"status": "error",
"error_code": "UNAUTHORIZED",
"message": "Invalid session signature. Please log in again."
}{
"status": "error",
"error_code": "ACCESS_DENIED",
"message": "You do not have permission to perform this action."
}{
"status": "error",
"error_code": "INTERNAL_ERROR",
"message": "An unexpected error occurred. Please try again later."
}Body
Required parameters to enable VNC access.
All parameters must be passed in the request body as application/x-www-form-urlencoded.
The session signature obtained from the "Create AUTH-session" call.
"session_signature_12345"
The unique identifier of the KVM VPS to enable VNC access for.
This value is specific to your VPS.
"kvm_123456_789012"
The expiration timestamp for the session, as obtained from the "Create AUTH-session" call.
Ensure that the session is valid and has not expired.
"1737476000"
The password to set for the VNC connection.
This password will be required to access the VNC session.
VNC password requirements:
- Exactly 8 characters long.
- Only letters (A-Z, a-z) and numbers (0-9).
- No symbols allowed.
"securepassword123"
Response
VNC access enabled successfully.
The status of the operation.
"success"
The new VNC status.
"enabled"
The noVNC web-based access port.
6080
The VNC port for client connections.
5901
The VNC server host address.
"example.edis.at"
Related topics
Enable VNC on your VPSHow to use the EDIS Global Management APIHow to change IP address in Windows ServerHow to reset Windows Administrator passwordHow to reset Linux root passwordWas this page helpful?