Skip to content

Vault Management API in Python

fer edited this page Mar 19, 2024 · 6 revisions

Overview

This guide details the steps to set up a Python script for interacting with the Bitwarden Vault Management API to retrieve items from a user's vault.

It assumes you have a Bitwarden account and are familiar with basic Python programming.

Prerequisites

  • Bitwarden account.
  • Python preinstalled on your system.
  • An API key from Bitwarden for authenticating API requests.
  • bw cli tool is preinstalled on your system.

Step 1: Install CLI

  1. Download the zipped file from the Bitwarden download page.
  2. Install unzip with sudo apt-get install unzip -y.
  3. Unzip the downloaded file with unzip bw-linux-X.zip (where X is the release num ber).
  4. Give the binary executable permissions with chmod u+x bw.
  5. Move the executable to a directory in your path with sudo mv bw /usr/local/bin.

Step 2: Login to CLI

You'll now need to log in to your Bitwarden account with the command:

bw login

You'll be prompted for your Bitwarden email address, master password, and (if applicable) the two-step login code. Once you've successfully logged in, you'll be greeted with You are now logged in! and you're ready to go.

Clone this wiki locally