Skip to content
Bifrost Docs

OAuth Troubleshooting

Common OAuth connection issues

Verify the OAuth connection exists:

  • Go to SettingsOAuth Connections
  • Check that the connection shows as “Connected”

Bifrost automatically refreshes tokens, but if a token is rejected before its stated expiry (common with providers like Pax8), you can refresh it programmatically:

integration = await integrations.get("Pax8")
await integration.oauth.refresh() # fetch fresh token

If the refresh token itself has expired:

  1. Delete the existing OAuth connection
  2. Re-authorize to get a fresh token

Ensure the OAuth app has the required scopes/permissions for your API calls.

from bifrost import workflow, oauth
import aiohttp
@workflow
async def call_graph_api():
"""Example Microsoft Graph API call."""
conn = await oauth.get("microsoft")
if not conn:
return {"error": "Microsoft OAuth not configured"}
headers = {"Authorization": f"Bearer {conn['access_token']}"}
async with aiohttp.ClientSession() as session:
async with session.get(
"https://graph.microsoft.com/v1.0/me",
headers=headers
) as resp:
return await resp.json()
Error Cause Fix
“OAuth not configured” Connection doesn’t exist Add OAuth connection in Settings
401 Unauthorized Token expired or wrong scopes Call oauth.refresh(), or re-authorize
“refresh_token invalid” Refresh token revoked Delete and re-authorize