I had some trouble requesting the api

QwindF

New Member
Jan 29, 2023
3
0
1
hi ,
I had some trouble requesting the api,
It returned a 401 error when I requested '/api2/json/nodes/{node}/qemu/{vmid}/vncwebsocket',
Some details will be shown in screenshots:
This is what it says in the official wiki:
1674989077355.png
good,This request 200
1674989223121.png
It returns me the parameters I need for my next get request,
1674989319381.png
But I made a get request with the corresponding parameter, and it returned an error of 401,
1674989465771.png
 
First, the post seems to be for PVE not for the backup server, so i'll move the thread to the correct subforum.

also you still have to provide the pve api ticket to the call and it is not a normal GET call, but intended to be opened as a websocket (e.g. by novnc) (see https://en.wikipedia.org/wiki/WebSocket)