Skip to main content
Connect your AI agent to a user’s FreshBooks account to create and send invoices, track expenses from receipts, and manage client information.

Connect Freshbooks to Auth0

1

Freshbooks setup

  1. Visit the Freshbooks Developer account page and sign up.
  2. Create a new app in the Freshbooks Developer Center
  3. Configure the app details:
    • Set an Application Name.
    • Set the Redirect URI: https://YOUR_AUTH0_DOMAIN/login/callback
    • Note: FreshBooks requires HTTPS for redirect URIs (except for local development).
    You can find the Auth0 domain in the Auth0 Dashboard.You can find this under Applications > [Your Application] > Settings > Basic Information > Domain.If you are using the custom domains feature, your Auth0 domain is the custom domain. You can find this under Branding > Custom Domains.
  4. Select the necessary Scopes (e.g., user:profile:read, user:clients:read, user:invoices:read, etc.)
  5. Save and copy the Client ID and Client Secret
To learn more about setting up Freshbooks, read the Login with Freshbooks documentation.
2

Auth0 setup

  1. In the Auth0 Dashboard, go to Authentication > Social.
  2. Select Create Connection, then choose Freshbooks.
  3. Click Continue.
  4. In General:
    1. Enter the Client ID and Client Secret from your Freshbooks OAuth app.
    2. Under Attributes, select the scope(s) required for your application. These determine what permissions your application can request from Freshbooks, whether for authentication (such as accessing basic profile details) or for API access (such as connecting to the provider's APIs).
    3. Add any additional scopes your application requires in the Additional Scopes field.
  5. In Advanced, Enable Token Vault. This lets the connection retrieve and securely store access tokens for third‑party APIs. Learn more in Configure Token Vault.
  6. Click Create.
  7. After creation, you are redirected to the Applications page. Select the application(s) to enable this connection for.
    Note: In a new Auth0 tenant, you can select the Default App.
  8. Once you have created your Freshbooks social connection, test your connection to ensure the setup is working correctly before using it in your application.
This guide walks you through setting up the Freshbooks connection in Auth0. For an end-to-end example that shows how to set up your app to call third-party APIs on the user's behalf using a connection like this, read the Call Other's APIs on User's Behalf Quickstart.

Token Vault configuration example

To configure the Token Vault for your FreshBooks connection, you can use the following code snippet in your application:
  • JavaScript
  • Python
const auth0AI = new Auth0AI();

export const withFreshbooksConnection = auth0AI.withTokenVault({
  connection: "freshbooks",
  scopes: ["user:profile:read", "user:clients:read", "user:invoices:read", ...],
  refreshToken: getAuth0RefreshToken(),
});

Next steps