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

Token Vault configuration example

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

export const withFreshbooksConnection = auth0AI.withTokenVault({
  connection: "freshbooks",
  scopes: [
      // required scopes for Token Vault
      "user:profile:read",
      // optional scopes specific to your app
      ...
  ],
  refreshToken: getAuth0RefreshToken(),
  authorizationParams: {
    prompt: "login",
  },
});

Next steps