How to setup username authentication

For PlanB to authenticate to your Bubble app as a particular user (e.g. with a username and password) you need to set up a backend workflow in your app. This gives you fine-grained control over which data PlanB can access through Bubble's privacy rules.

1

Create a backend workflow named "planb"

In your Bubble editor, go to the Backend workflows section and create a new API workflow. Name the endpoint "planb" (or optionally whatever name you configure in PlanB settings). Set it to POST with parameters: username (text), password (text), and secret (text).

Bubble backend workflow editor showing the planb API endpoint with username, password, and secret parameters
2

Optionally check a secret before testing the credentials

Add a "Terminate this workflow" step that checks the secret parameter. This adds a layer of security to prevent people from trying to guess credentials to your Bubble app.

Bubble workflow step showing Terminate this workflow with condition: Only when secret is not ImpossibleToGuessAndComplicated
3

Give it a single action to log the user in

Add a "Log the user in" action that uses the username and password parameters from the API call.

Bubble workflow action showing Log the user in with Email set to username parameter and Password set to password parameter
4

Create a user in your app with specific privacy rules for data access

Create a dedicated user in your Bubble app that has the privacy rules you want PlanB to use. This user determines which data PlanB can read during backups.

Bubble privacy rules showing View all fields, Find this in searches, and View attached files checked; Create via API, Delete via API unchecked
5

Add the username and password into PlanB settings

In your PlanB app settings, go to the "Advanced Authentication" section. Enter the backup user email, password, optional secret, and the endpoint name. Use the "Test username & password" button to verify the setup works.

PlanB authentication settings panel showing API Token and Username & Password tabs, with fields for backup user email, password, optional secret, and endpoint name