[GH-ISSUE #19] Get VNC Ticket #16

Closed
opened 2026-02-26 17:32:07 +03:00 by kerem · 7 comments
Owner

Originally created by @Snakzi on GitHub (Jul 13, 2022).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-php/issues/19

What happened?

Hello,

how do you get a ticket?

$vncTicket = $client->get('/access/ticket');

is giving me status code 200, but the data block is empty.

Best regards

Expected behavior

Giving me a ticket instead of empty response in data block

Relevant log output

No response

PHP Version

8.4

Proxmox VE Version

5.4

Version (bug)

latest

Version (working)

No response

On what operating system are you experiencing the issue?

Mac OSX

Pull Request

  • I would like to do a Pull Request
Originally created by @Snakzi on GitHub (Jul 13, 2022). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-php/issues/19 ### What happened? Hello, how do you get a ticket? ``` $vncTicket = $client->get('/access/ticket'); ``` is giving me status code 200, but the data block is empty. Best regards ### Expected behavior Giving me a ticket instead of empty response in data block ### Relevant log output _No response_ ### PHP Version 8.4 ### Proxmox VE Version 5.4 ### Version (bug) latest ### Version (working) _No response_ ### On what operating system are you experiencing the issue? Mac OSX ### Pull Request - [ ] I would like to do a Pull Request
kerem 2026-02-26 17:32:07 +03:00
Author
Owner

@franklupo commented on GitHub (Jul 13, 2022):

Hi,
this code retrieve ticket for login not for vnc.

best regards

<!-- gh-comment-id:1183504511 --> @franklupo commented on GitHub (Jul 13, 2022): Hi, this code retrieve ticket for login not for vnc. best regards
Author
Owner

@Snakzi commented on GitHub (Jul 13, 2022):

How do I retrieve the ticket for VNC?

<!-- gh-comment-id:1183587695 --> @Snakzi commented on GitHub (Jul 13, 2022): How do I retrieve the ticket for VNC?
Author
Owner

@franklupo commented on GitHub (Sep 13, 2022):

For open VNC:

  • create ticket login /access/ticket
  • open vncproxy /nodes/{node}/qemu/{vmid}/vncproxy
  • open https://{host}:{port}/?console={console}&vmid={vmId}&vmname={vmName}&node={node}&resize=scale&novnc=1
<!-- gh-comment-id:1245488147 --> @franklupo commented on GitHub (Sep 13, 2022): For open VNC: - create ticket login /access/ticket - open vncproxy /nodes/{node}/qemu/{vmid}/vncproxy - open https://{host}:{port}/?console={console}&vmid={vmId}&vmname={vmName}&node={node}&resize=scale&novnc=1
Author
Owner

@franklupo commented on GitHub (Oct 30, 2022):

News?

<!-- gh-comment-id:1296250699 --> @franklupo commented on GitHub (Oct 30, 2022): News?
Author
Owner

@HugoMskn commented on GitHub (Jan 15, 2024):

Could you provide with code ? I tried
$client->get('/access/ticket')->getResponse();
$client->get('/access/ticket')
But none is returning the ticket for the novnc thing

<!-- gh-comment-id:1891559422 --> @HugoMskn commented on GitHub (Jan 15, 2024): Could you provide with code ? I tried `$client->get('/access/ticket')->getResponse();` `$client->get('/access/ticket')` But none is returning the ticket for the novnc thing
Author
Owner

@franklupo commented on GitHub (Jan 15, 2024):

the mechanism is different for VNC you need to call:

  • open vncproxy /nodes/{node}/qemu/{vmid}/vncproxy
  • open https://{host}:{port}/?console={console}&vmid={vmId}&vmname={vmName}&node={node}&resize=scale&novnc=1
<!-- gh-comment-id:1891761620 --> @franklupo commented on GitHub (Jan 15, 2024): the mechanism is different for VNC you need to call: - open vncproxy /nodes/{node}/qemu/{vmid}/vncproxy - open https://{host}:{port}/?console={console}&vmid={vmId}&vmname={vmName}&node={node}&resize=scale&novnc=1
Author
Owner

@HugoMskn commented on GitHub (Jan 19, 2024):

Tried it with the following code :

$client->get('/nodes/pve/qemu/100/vncproxy'); echo '<iframe src="https://192.168.1.2:8006/?console=kvm&vmid=100&vmname=Win7&node=pve&resize=scale&novnc=1" </iframe>';

But the Iframe just return a 401 error "no ticket"

<!-- gh-comment-id:1900491468 --> @HugoMskn commented on GitHub (Jan 19, 2024): Tried it with the following code : ` $client->get('/nodes/pve/qemu/100/vncproxy'); echo '<iframe src="https://192.168.1.2:8006/?console=kvm&vmid=100&vmname=Win7&node=pve&resize=scale&novnc=1" </iframe>';` But the Iframe just return a 401 error "no ticket"
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-api-php#16
No description provided.