Reason: no such token 'TOKENID' for user 'dev@pve'

jebarpg

New Member
Mar 15, 2024
3
0
1
I have exported my token in this form:

Bash:
export PROXMOX_VE_APITOKEN='dev@pve!TOKENID=mytokenicreatedusingthegui'

And I get this:

Bash:
error retrieving next VM ID: received an HTTP 401 response - Reason: no such token 'TOKENID' for user 'dev@pve'

I also tried this:

Bash:
export PROXMOX_VE_APITOKEN='dev@pve!mytokenicreatedusingthegui'

And I get this:

Bash:
pulumi:providers:proxmoxve resource 'proxmoxve' has a problem: could not validate provider configuration: invalid value for api_token (Must be a valid API token, e.g. 'USER@REALM!TOKENID=UUID'). Examine values at 'proxmoxve.apiToken'.

dev has all permissions set to yes.

I'm using the pulumi provider from

"@muhlba91/pulumi-proxmoxve"

Is this an error in pulumi or Proxmox or both?

I'm not sure where to go from here. Any ideas or help is greatly appreciated.
Thank you.
 
I still get the same error using curl as well.
Bash:
HTTP/1.1 401 no such token 'tokenid' for user 'dev@pve'
 
O geez, I figured it out. So I was following this guide: https://i12bretro.github.io/tutorials/0572.html
and I entered into the token name field a random token number I generated at

https://www.random.org/passwords/?num=1&len=24&format=plain&rnd=new

as recommend. But what I should have done was entered the name of the token and not a random token id I made up here... so I name the Token name TOKENID and then used the secret that was generated and everything worked...

So for example I was naming the Token Name field something like 'vhMVKHjTKGnbvpDTVd' and then running the command

export PROXMOX_VE_APITOKEN='dev@pve!TOKENID=vhMVKHjTKGnbvpDTVd'

which since I name the token name 'vhMVKHjTKGnbvpDTVd' the command would have needed to be

export PROXMOX_VE_APITOKEN='dev@pve!vhMVKHjTKGnbvpDTVd=my_secret_token_here'...

anyways it works now that I configured things correctly.
 

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!