Vault HTTP API is not working for token lookup but working via CLI

Hi All,

I’m running a 3 node vault cluster with version 1.4.3, when I create vault tokens I’m unable to lookup them using API, but I can look up them using the vault CLI.

Not working:

curl -kv -H “X-Vault-Token: $VAULT_TOKEN” -X POST

Error Message:

{"errors":["1 error occurred:\n\t* permission denied\n\n"]}

Working Scenario:

VAULT_TOKEN= xxxx /opt/vault/vault/vault token lookup

I’m not sure what is going on here, This used to work fine previously, Just now having these issues when I deployed a new cluster with 1.4.3 version

Thanks in Advance

Dump question: is your variable set in the first command? In the second command you set the variable VAULT_TOKEN to use it with the cli. The curl command just points to the usage, not the setting of the variable.

Hi @Wolfsrudel
No No I’m directly using the token, while posting the question I just replaced the token with that variable