proxmoxer API 401 error

hvnoclabs

New Member
Apr 2, 2021
11
1
3
26
Hi Proxmox Forums,

I am having some trouble with proxmoxer API. I am using simple password Auth locally on the same system for the API queries so I don't feel the need for tighten authentication. After about x2 hours the API is unaccusable, I understand it may be a timeout feature, but I was wondering if there is a way to edit this to never timeout. The reason I need the API session to never break, I have services that are tied to the API session and if I restart them to renew the auth there is a loss of service that is impacting... I've looked all around to try to figure out a solution to this to see if there was a way to disable the timeout or to write a script that says renew the auth, I couldn't find any details on this. Any help would be great.

Thanks!
 
Actually I have not seen that guide/KB so if I understand correctly using Tokens will solve my timeout issue? I guess I may need to read up on some KBs that go over writing scripts that use Tokens and I'll give it a try.
 
Actually I have not seen that guide/KB so if I understand correctly using Tokens will solve my timeout issue? I guess I may need to read up on some KBs that go over writing scripts that use Tokens and I'll give it a try.
This is not a guide, the link points to the PVE documentation.
API tokens are designed exactly for such use cases. They allow stateless access to the API and should therefore not suffer from session timeouts.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!