INNER CODE UNIT · Python

get_supabase_headers

phasehq/console · backend/api/utils/syncing/supabase/main.py:27

def get_supabase_headers(access_token):
    return {
        "Authorization": f"Bearer {access_token}",
        "Content-Type": "application/json",
    }


def list_supabase_projects(credential_id):
    """List all Supabase projects accessible with the given access token."""
    credentials = get_credentials(credential_id)
    access_token = credentials.get("access_token")

    response = requests.get(
        f"{SUPABASE_API_BASE_URL}/projects",
        headers=get_supabase_headers(access_token),
    )

    if response.status_code == 200:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…