API basics - how to pull a password

Hi, could you get me started on API access to retrieve passwords.

I’m a vaultwarden and API novice.

So far I have tried:
$ curl https://vaultwarden.mydomain.tld/list/object/items
$ curl https://vaultwarden.mydomain.tld/api/object/password/{id}

…to no avail (404 and other errors)

Any basic steps would be apprecaited.

Vaultwarden does not support the public Bitwarden API.
We only support the client API which is very different.

Thanks for the info.
Is the client API documented? And would you be so kind as to give me a sample curl call to it?

It is not documented. Best way would be to use a browser and use the Developer Console (F12) and see what calls it does.

An other option would be, and that might be a better solution for you is to use the Bitwarden CLI, which has a built-in API Server.
See: Password Manager CLI | Bitwarden Help Center

Thanks - I’ll take a look at both options.

You may wish to look at the documented valut management API.

Which as mentioned can be accomplished with bw serve command using the Bitwarden CLI.

For posterity, this pulls in the whole vault

curl --request GET \
    --url "https://vaultwarden-instance.com/api/sync?excludeDomains=true" \
    -H "Authorization: Bearer <token>"

Decrypting here https://github.com/jcs/rubywarden/blob/master/API.md#cipher-encryption-and-decryption

Hey, sorry for reviving this old post. I am trying to automate new user invitation with the Vaultwarden API. How do you find the token to authenticate?

1 Like