API token is failing and I don't know why

Gorf

New Member
Dec 13, 2024
6
0
1
Greetings all. On my server (8.3.0), I am attempting to configure API access for Zabbix monitoring. I've got through the documentation multiple times but I can't get it to work. It keeps throwing 401 errors. I'd like to produce a log that can show me a debug output as to why. But I'm struggling to figure this out. Can anyone point me in the right direction?
 
I just got it working this week, and after having 401 errors myself, I found out that on some tutorials, the value of the Macro '{$PVE.TOKEN.ID}' was wrong.
It has to be 'USER@REALM!TOKENID' (as mentioned on the template page by Zabbix), and some tutorials only mention 'TOKENID'.
And the next point is to make sure, that the token-access has the needed rights (not just the user owner of the token).
 
  • Like
Reactions: UdoB