Getting permission denied with curl request

I new to vault. I created new secret and trying to get it via curl but getting permission denied even with root token. i’ll attach screenshot for reference.

vault kv get -output-curl-string secret/myapp

That should output the equivalent curl command

It’s x-vault-token for the header, not x-config-token (or if you want to be pedantic, you can also use Authorization: Bearer yourtokengoeshere )

Thanks @benvanstaveren It worked.

1 Like