- Organized 252 files across project - Root directory: 187 → 2 files (98.9% reduction) - Moved configuration guides to docs/04-configuration/ - Moved troubleshooting guides to docs/09-troubleshooting/ - Moved quick start guides to docs/01-getting-started/ - Moved reports to reports/ directory - Archived temporary files - Generated comprehensive reports and documentation - Created maintenance scripts and guides All files organized according to established standards.
1.8 KiB
1.8 KiB
Omada API Authentication Notes
Current Issue
The Omada Controller API /api/v2/login endpoint requires the Omada Controller admin username and password, not OAuth Client ID/Secret.
OAuth Application Configuration
Your OAuth application is configured in Authorization Code mode, which requires user interaction and is not suitable for automated API access.
Solutions
Option 1: Use Admin Credentials (Recommended for Testing)
Update ~/.env to use your Omada Controller admin credentials:
# For /api/v2/login endpoint - uses admin username/password
OMADA_CONTROLLER_URL=https://192.168.11.8:8043
OMADA_ADMIN_USERNAME=your-admin-username
OMADA_ADMIN_PASSWORD=your-admin-password
OMADA_SITE_ID=090862bebcb1997bb263eea9364957fe
OMADA_VERIFY_SSL=false
Note: The current code uses OMADA_API_KEY/OMADA_API_SECRET as username/password for /api/v2/login.
Option 2: Switch to Client Credentials Mode
- In Omada Controller: Settings → Platform Integration → Open API
- Edit your application
- Change Access Mode from "Authorization Code" to "Client Credentials"
- Save changes
- Then use Client ID/Secret with OAuth token endpoint (if available)
Option 3: Use OAuth Token Endpoint
If your controller supports OAuth token endpoint, we need to:
- Find the OAuth token endpoint URL
- Update Authentication.ts to use OAuth2 token exchange instead of /api/v2/login
Current Status
- Controller is reachable: ✓
/api/v2/loginendpoint exists: ✓- Authentication fails with Client ID/Secret: ✗ (Expected - endpoint needs admin credentials)
Next Steps
- For immediate testing: Use admin username/password in ~/.env
- For production: Consider switching OAuth app to Client Credentials mode
- Alternative: Check Omada Controller documentation for OAuth token endpoint