OAuth Authentication
OAuth users need to register an app with us before using this feature. Visit our OAuth Setup Guide to get your client credentials and configure your redirect URL.
Step 1: Get Authorization URL
Using theClient ID and Client Secret you received when registering your app, generate an authorization URL that users will visit to grant your app access:
Step 2: Handle OAuth Callback
After the user authorizes your app, they’ll be redirected back to your redirect URI with an authorization code. Use this code to exchange it for access tokens:newTokenStore() is an in-memory store — great for demos and quick starts. For production, you’ll want a persistent TokenStore so users only need to install once.
Step 3: Token Management & Persistence
For production, you’ll want to implement your ownTokenStore that persists tokens to a database, cache, or file.
The SDK will automatically call your set() when new tokens are issued, and get() when it needs to reuse or refresh them.
Example: Python persistent store (SQLite)
This SQLite example is meant as a simple demo. In production, you’ll want to plug in whatever storage makes sense for your stack (e.g. Postgres, Redis, cloud secret store).
Further examples
For a real-world production example, see how Pylon implemented OAuth and token storage as part of their Fathom integration.Common Mistakes
-
Calling
tokenStore.get()too early Nothing will be there yet — tokens are only written after the SDK exchanges the authorization code. - Assuming tokens never expire Access tokens are short-lived. Always persist the refresh token and let the SDK refresh automatically.
-
Using
newTokenStore()in production It’s an in-memory store for demos only. Use a persistent store (database, Redis, file, etc.) so tokens survive restarts.
Manual Token Exchange (Optional)
If you prefer to handle the token exchange yourself (or to debug), you can call the OAuth token endpoint directly.The SDK handles token exchange and refresh automatically. You only need this section if you’re debugging or implementing your own flow.
access_token and a refresh_token.
Refresh an expired access token:
access_token and a refresh_token. Use the new access_token in API requests. Store and use the new refresh_token the next time your access token expires. A refresh_token can only be used once. If it is unused, it stays valid until the user revokes access.
OAuth Handler Examples
Complete OAuth flow implementations for web frameworks:OAuth Scopes
Currently, the only available scope is:public_api— Access to the Fathom API
OAuth Rate limits
60 requests per 60 seconds per OAuth app for thehttps://api.fathom.ai/external/v1/oauth2/token endpoint
