# Moneybird OAuth Credentials Setup

## Prerequisites

- A Moneybird account (sign up at [moneybird.com](https://www.moneybird.com))

> **Testing without your own app**: Apideck provides shared Moneybird OAuth credentials so you can try the connector before registering your own application. When you use them, the Moneybird authorization screen shows "Apideck" rather than your own brand. Register your own application (steps below) before going to production.

## Steps

1. Log in to your Moneybird account
2. Navigate to **User Settings** → **Developer** → [**Applications**](https://moneybird.com/user/applications)
3. Click **New Application**
4. Fill in the application details:
   - **Name**: Your application name (e.g., "Your Company - Unify")
   - **Redirect URI**: `https://unify.apideck.com/vault/callback`
5. Click **Create Application**
6. Copy the **Client ID** and **Client Secret**

## Scopes

Moneybird uses scope-based access control. Request the following scopes:

| Scope | Access |
|-------|--------|
| `sales_invoices` | Sales invoices, contacts (default scope when none is requested) |
| `documents` | Purchase invoices, receipts, general documents |
| `bank` | Bank accounts, financial statements |
| `settings` | Administration settings, ledger accounts |

Moneybird also offers `estimates` and `time_entries` scopes. To reach contacts, request at least one of `sales_invoices`, `documents`, `estimates`, `bank`, or `settings`: `time_entries` alone does not grant access to contacts.

## Notes

- As of now, Moneybird OAuth tokens do not expire, though Moneybird notes this may change in the future. The connector wires a refresh URL regardless, so if Moneybird does start expiring tokens, existing connections keep working without any action from you.
- The redirect URI must match exactly, including protocol and trailing slash
- For local development, register a separate app with `https://localhost:3050/vault/callback`
