[SOLVED] Websocket connection invalid pvevnc ticket


New Member
Sep 23, 2022
Reading through the API call I can successfuly make request to the following endpoints:

post - api2/json/access/ticket
post - api2/json/nodes/node/lxc/vmid/vncproxy
get api2/json/nodes/node/lxc/vmid/vncwebsocket

From these (besides other things) I have the pvevnc-ticket, the websocket port and a pveauthcookie
but then when I'm trying to call:


fails with: Connect Error: Error: Server responded with a non-101 status: 401 permission denied - invalid PVEVNC ticket

The vnc ticket is encoded in both cases and it works fine when I GET ../vmid/vncwebsocket

Am I missing something?
Last edited:
are you sure the ticket is urlencoded?
should work, since we do basically the same in novnc
are you sure the ticket is urlencoded?
should work, since we do basically the same in novnc
I rewrote this part in an another environment it worked, copy pasted back and it works, maybe it was a typo somewhere I couldnt see, thanks for your time
Estou passando pela mesma coisa.

Algumas coisas que notei foram.
Se eu estiver conectado ao servidor Proxmox e chamar a url yl CueUx4R/qI6CMAbSOWwAexaFXLbwvTeo4IJj0sbW1Q3FNC71urbTYBaD2BhkLrR06Onw05aJM72/R9kESnhiYk9nt0Vhud0XtSg2zttjG5247m39rkKiDIGvgqijMEVOn0jD2hoFRCrTGTr6O 1 TnUY7D+EfSxtnVXpcE4jU85U0YiKLb1Ifyyb2G4f2zw+KerZ /CTTXtcuB4GHq9P+ pskTPZcFzhajnxTSVKdGT2Y+n9MIS1DWEa2d7W0dGvo/5+VHS2Ilef58dFChSPnjywPrCtbqnOEbb6e6ZV4wlx7YLA==&port=5900


Agora, se eu fizer logoff, os tokens de autorização param de funcionar.

Inspecionando a página do console chamada notei que tem um script java com as credenciais

Deve ficar assim:

if (typeof(PVE) === 'indefinido') PVE = {};
PVE.UserName = 'root@pam';
PVE.CSRFPreventionToken = '64E35C3E:rGVgFRAeNk1A+qKoeITZ0K+nzjlw2+CxY52WD2Sm1Rg';

mais fique assim

<script type="text/javascript">
if (typeof(PVE) === 'undefined') PVE = {};
PVE.UserName = '';
PVE.CSRFPreventionToken = 'nulo';


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!