Skip to main content
BunShip supports TOTP-based two-factor authentication (2FA) using authenticator apps such as Google Authenticator, Authy, or 1Password. The setup flow has three steps: initiate setup, scan the QR code, then verify a code to activate.

Setup 2FA

Requires a valid Bearer token.
Generates a TOTP secret, QR code, and backup recovery codes. The user must scan the QR code with an authenticator app and then call the verify endpoint to finalize activation.

Request Body

string
required
Current account password to confirm identity.

Response

string
TOTP secret string for manual entry into the authenticator app.
string
Base64-encoded data URL of the QR code image.
string[]
One-time backup codes for account recovery if the authenticator device is lost.

Errors

Example


Verify and Enable 2FA

Requires a valid Bearer token.
Verifies a TOTP code from the authenticator app and permanently enables 2FA on the account. Must be called after the setup endpoint.

Request Body

string
required
6-digit code from the authenticator app. Must be exactly 6 numeric digits.

Response

string
Confirmation message.

Errors

Example


Disable 2FA

Requires a valid Bearer token.
Disables two-factor authentication. Requires both the current password and a valid TOTP code to confirm the action.

Request Body

string
required
Current account password.
string
required
Current 6-digit code from the authenticator app. Must be exactly 6 numeric digits.

Response

string
Confirmation message.

Errors

Example