Skip to content
Payments · Secret guide

Leaked FreshBooks access token: what to do in the first hour

High severityDetected onlyLast verified · 4 min read

A FreshBooks access token lets an application read and change the accounting data of the FreshBooks account it is connected to. Depending on the scopes granted, that can include clients, invoices, expenses and payment records. Invoices are the sensitive part, because a changed invoice or a new payment instruction can cost you money or misdirect a customer. Revoke the token first, then check the records it could reach.

Check your GitHub account for leaked secrets — free

Provider
Freshbooks
Severity
High
Impact
SaaS account access and billing
Checked live by LeakWatch
No

What a FreshBooks access token looks like

FreshBooks access tokens are long strings of lowercase letters and digits with no distinctive prefix. The format of an OAuth token is also not something you can confirm by looking at the value alone, so context matters more than shape. A token next to the word freshbooks in a configuration file, a script or a log is the thing to check.

<64 characters of lowercase letters and digits>   FreshBooks token (masked)

Tokens are normally obtained through an OAuth flow and then stored by the application. A token that a developer copied by hand, for testing, is one of the most common ways they end up in code.

How FreshBooks access tokens get leaked

  • Configuration files committed to a repository. An integration that stores the token in a settings file next to other credentials.
  • Test scripts. A quick script written to check the API, with the token copied in and then committed.
  • Browser and app code. A token placed in client-side code by mistake, where anyone who loads the page can read it.
  • Logs. A request logger that records the authorization header of every call.
  • Shared spreadsheets and notes. A token copied into a document to share with a contractor or accountant.

What to do in the first hour

  1. Revoke the access. Open the account settings and find the apps or developer section. Revoke the connection for the application that leaked. Third-party descriptions say you can revoke access in the developer portal, so check where your account shows connected apps.
  2. Reconnect the application through the normal authorization flow, which issues a new token. Store the new value in your secret manager, never in the code.
  3. Review invoices and payments. Look for invoices, clients, bank details and payment settings that changed since the exposure. Check that the payment instructions on open invoices are correct.
  4. Check the client list. Look for new clients or changed contact details you do not recognise.
  5. Tell your accountant if the records could have been altered, so they can review the books.
  6. Clean the repository. Remove the token from files and history, and check the logs. See I accidentally pushed an API key to GitHub.

Not sure what else leaked from the same integration? Run a free scan.

Not sure what else leaked? Run a free scan.

Revoke it at FreshBooks

Open the account settings in FreshBooks, find the section that lists connected apps or developer access, and revoke the access for the application that leaked. FreshBooks’ OAuth endpoints also support revoking a refresh token, which invalidates it for future token requests. This guide has not confirmed the exact menu labels or the endpoint details against FreshBooks’ official documentation, so check those before you rely on them. Revoking access does not delete data in the account, so the review in the first hour still matters.

How LeakWatch detects it

The rule is called “Freshbooks Access Token”. It looks for the word freshbooks near an assignment, followed by a value of 64 lowercase letters and digits, with word boundaries around the value. The word is required, so a token under a generic name is not reported. The severity is high. This type is not checked live: LeakWatch does not call FreshBooks with the value it finds.

LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

FAQ

Does revoking the app stop my invoices?

Only the connected application loses access. Invoices already sent are not affected. Reconnect the app to restore the integration.

Is an access token enough to change payment details?

It depends on the scopes granted to the application. Review what the integration needs, and remove scopes it does not use.

Should I rotate the token regularly?

Tokens expire on their own, and the application refreshes them. What matters most is that the stored credential, including any refresh token, stays out of the code.

Get alerted next time a secret leaks — create a free account

LeakWatch is not affiliated with Freshbooks.