ozpac
June 14, 2023, 10:51pm
1
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.
ozpac
June 15, 2023, 8:13am
3
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
ozpac
June 15, 2023, 12:30pm
5
Thanks - I’ll take a look at both options.
cksapp
June 16, 2023, 2:50pm
6
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