Change api token life

it's possible to change api token life ?

It normally expires at the end of the session. Might be possible to change it using a cookie manager or similar tools, but it could cause problems. Why do you want to do this?
 
i use https://pve.proxmox.com/wiki/Proxmox_VE_API

I create, remove, configure my container and VM with this ... but api token expire every 2 hours.

i read "NOTE: Tickets have a limited lifetime of 2 hours. But you can simple get a new ticket by passing the old ticket as password to the /access/ticket method."

And it's not very simple for me, because i update this new token on my script every time.
 
If you're using your script on the ProxMox host, then you can use the 'pveum' tool to generate a new ticket. Save the old ticket and pipe it.

Code:
export ticket='PVE:root@pam:5C2E01C9::mVlvibFc+UNC/2yOITxG4/8pPjgab8[...]'
echo ${ticket} | pveum ticket root@pam
 
Code:
Parameter: api_password | the password to authenticate with
you can use PROXMOX_PASSWORD environment variable

You can look into this.
 

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!