> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to register your own Moneybird OAuth app

> Register a Moneybird OAuth app and connect it to Nango

This guide shows you how to obtain the Client ID and Client Secret required to let users authorize access to Moneybird.

<Steps>
  <Step id="create-oauth-app" title="Create an external OAuth application">
    Sign in to Moneybird and open [New application](https://moneybird.com/user/applications/new). Choose an external OAuth application rather than a personal API token, then enter a name your users will recognize.
  </Step>

  <Step id="add-callback-url" title="Add the callback URL">
    For Nango Cloud, set the redirect URI to:

    ```text theme={null}
    https://api.nango.dev/oauth/callback
    ```

    For a self-hosted or local Nango environment, use the callback URL shown by that environment. Moneybird requires the `client_id` and `redirect_uri` in the authorization request to match the registered application exactly.
  </Step>

  <Step id="copy-oauth-credentials" title="Copy the OAuth credentials">
    Save the Client ID and Client Secret generated by Moneybird. Treat the Client Secret as a credential and do not expose it to client-side code.
  </Step>

  <Step id="configure-scopes" title="Configure scopes in Nango">
    Create the Moneybird integration in Nango and enter the Client ID and Client Secret. If no scope is supplied, Moneybird grants `sales_invoices` by default.

    Add only the scopes your integration needs: `sales_invoices`, `documents`, `estimates`, `bank`, `time_entries`, or `settings`. Accessing contacts requires at least one scope other than `time_entries` from that list.
  </Step>
</Steps>

Moneybird returns both an access token and a refresh token. Access tokens currently do not expire, but Moneybird may add expiration in the future. Nango accepts the response without `expires_in`, retains the refresh token, and can use Moneybird's token endpoint for refresh requests. If Moneybird adds `expires_in`, Nango will also use it when scheduling token refreshes.

For more details, see [Moneybird authentication](https://developer.moneybird.com/authentication).
