I have freshly installed a Proxmox VE on a running Debian12 machine, everything works just fine, but i have some problems with the API.
But whatever i do, i get an error:
Also tried using the ticket from
Proxmox Virtual Environment 8.2.4
Python:
import requests
import json
proxmox_url = "http://localhost:8006/api2/json"
node = "debian"
auth_token = "PVEAPIToken=root@pam!mytokenid=0000aaa0-aa00-000a-0aaa-0aaa00a000a0"
headers = {
"Authorization": auth_token,
}
response = requests.get(f"{proxmox_url}/nodes", headers=headers, verify=False)
response.raise_for_status()
resp = response.json()
print(json.dumps(resp, indent=4))
But whatever i do, i get an error:
Code:
requests.exceptions.HTTPError: 401 Client Error: No ticket for url: https://localhost:8006/api2/json/nodes
Also tried using the ticket from
/access/ticket
, I successfully get back the ticket and the CSRFPreventionToken, but executing any API calls with them results in the same error message as above.Proxmox Virtual Environment 8.2.4