"""Run AnyDesk session import directly (bypasses HTTP auth)""" import asyncio, sys, os sys.path.insert(0, os.path.dirname(__file__)) os.environ.setdefault("DATABASE_URL", "postgresql://bmc_hub:bmc_hub@localhost:5433/bmc_hub") from app.services.anydesk import AnyDeskService async def main(): svc = AnyDeskService() print("Credentials:", svc._get_credentials()) print("\nFetching sessions (last 30 days, up to 1000)...") result = await svc.fetch_sessions_from_api(days=30, limit=1000) print(f"\nResult: {result}") asyncio.run(main())