How to login with API

HI Team, I have question for how to login vault with API;
And I’m using a enterprise vault, my team has a sub BU let’s call it as BU_Demo.
And the vault login link is:;
So how could I login my BU with API, how I setup the parameter, Thanks.

Depends on the auth type you want to use.

You can always get it from the CLI too:

$ vault login -method=ldap -output-curl-string username=test 
Password (will be hidden): 
curl -X PUT -H "X-Vault-Request: true" -d '{"password":"myPassword"}' https://vault.basement.lab/v1/auth/ldap/login/test
1 Like

Thanks for share, I’ll try it. Hope it works.

HI Aram,
It works, if anyone who has the same question, you could follow.