Login API gives error {"errors":["missing client token"]}

Im using the api: curl --request POST --data @payload.json https://<hostname_vault>/v1/auth/userspass/login/test_user

this gives me error:
{“errors”:[“missing client token”]}

You are missing the token in your curl request
--header "X-Vault-Token: $VAULT_TOKEN"

Hi, but i am requesting for the token using this API. shouldnt this work without token? i am passing the password. This works with vault cli tool without the token env set.

I am referring to: https://www.vaultproject.io/docs/auth/userpass/

Sure, my fault.

Is it just a typo here, or is there really a userspass in the path? Should be userpass.

https://<hostname_vault>/v1/auth/userspass/login/test_user

Aah !!! What a shame :frowning: Thanks Buddy that works ! :slight_smile:

1 Like