Articles in this section

How to use API_TOKEN to connect to a VNC Console?

Applicable to:

  • SolusVM 2

Question

How to use API_TOKEN to connect to a VNC Console?

Answer

  1. Create an API token in SolusVM 2 UI > ACCESS > API tokens
  2. Use the token to build a request form the list:
    https://docs.solusvm.com/en/solusvm2/api-reference/api/#tag/Server-Actions/operation/server-vnc

    # curl -k -X POST \  -H "Content-Type: application/json" \  -H "Authorization: Bearer <API_TOKEN>" \  https://<MANAGER_IP>/api/v1/servers/<VM_ID>/vnc_up

Where:

  • <API_TOKEN> is the API token you created in SolusVM.
  • <MANAGER_IP> is the IP address of your SolusVM Manager node.
  • <VM_ID> is the internal VM ID shown in the SolusVM interface.

The output is in JSON format:

{  "url": "<encrypted_connection_token>",  "vnc_proxy_url": "https://<MANAGER_IP>/vnc?url="}

Note: SolusVM 2 uses WebSockets to establish a connection, so the resulting URL should be used in a VNC client that supports WSS.

Note: For security reasons, API tokens, VM UUIDs, and any connection details returned by the API should not be exposed to end users.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.