OAuth Errors
Diagnose token refresh failures, invalid grant errors, and provider-specific OAuth issues.
OAuth Errors
Token refresh failed — integration stops working
Symptom: Tools for a specific integration start returning errors after working fine for days or weeks. The error message mentions "token refresh" or "unauthorized."
Cause: The refresh token has been invalidated. This can happen if you revoked Ferrule's access from the third-party service's settings, if the provider expired a long-lived refresh token, or if you re-authorized the integration in a way that invalidated the previous token.
Solution:
- Open Dashboard → Integrations and click Disconnect next to the affected integration.
- Click Connect and complete the OAuth flow again.
- Generate a new API key or use your existing one — Ferrule will automatically use the newly stored tokens.
"Invalid grant" error during reconnect
Symptom: When you try to reconnect an integration, the OAuth flow fails with an "invalid_grant" error, or Ferrule shows a connection error after the redirect.
Cause: The authorization code returned by the provider has already been used or has expired (most providers expire codes in 60 seconds).
Solution:
- Start the connection flow again from Dashboard → Integrations → Connect. Do not use the browser back button or reload the callback URL.
- Complete the provider's authorization screen promptly — do not leave it open for more than a minute before approving.
- If the error persists, clear your browser cookies for the provider's domain and try again from a fresh tab.
Scope mismatch — tools return permission errors
Symptom: The integration connects successfully but specific tools return "insufficient scope" or "permission denied" errors from the upstream API.
Cause: The OAuth scopes Ferrule requested do not include the permissions needed for the tool you are calling. This can happen if you approved a reduced set of permissions during the OAuth flow, or if the provider requires additional scopes for certain API endpoints.
Solution:
- Disconnect and reconnect the integration from the Ferrule dashboard. When the provider shows the permissions screen, accept all requested scopes.
- If the provider asks you to choose between minimal and full access, choose full access (or the scope set that Ferrule requests).
- If you manage the OAuth application yourself, verify the application's configured scopes match what Ferrule's integration requires.
Redirect URI mismatch
Symptom: The OAuth flow fails immediately after you approve access, with an error from the provider saying "redirect_uri_mismatch" or similar.
Cause: The redirect URI registered in the OAuth application on the provider's developer console does not match the URI Ferrule sends during the flow.
Solution:
This error typically means the provider's OAuth application has a misconfigured redirect URI. Contact Ferrule support with the provider name and the exact error message — the team will verify the redirect configuration and resolve the issue.
Box: tokens stop working after first use (single-use refresh tokens)
Symptom: Box tools work once after connecting but fail on subsequent calls with a token error.
Cause: Box uses single-use refresh tokens: each time a refresh token is used to obtain a new access token, a new refresh token is issued and the old one is invalidated. If a concurrent request uses the old refresh token before Ferrule stores the new one, the token chain breaks.
Solution:
- Disconnect and reconnect Box from Dashboard → Integrations.
- Avoid running concurrent requests against the Box integration immediately after connecting — let the first request complete and let Ferrule store the refreshed tokens before sending more.
- If the issue recurs under load, contact Ferrule support. The gateway serializes token refreshes per integration, but very high concurrency can still expose this race.
Google: "access_type=offline" not returning refresh token
Symptom: Google Drive, Google Docs, Google Analytics, or Google Search Console integrations work initially but fail after the access token expires (typically 1 hour). Reconnecting temporarily fixes the issue.
Cause: Google only issues a refresh token when prompt=consent is included
in the authorization request. If you previously authorized Ferrule without seeing
the consent screen (because you had granted access before), Google may not issue
a new refresh token.
Solution:
- Open the Google Account Permissions page and revoke Ferrule's access for the affected Google service.
- Return to Dashboard → Integrations and reconnect the integration.
- Google should now show the full consent screen and issue a refresh token.