Files
Datacenter-Control-Complete/OMADA_CUSTOMER_ID_SETUP.md
2026-02-09 21:51:31 -08:00

64 lines
2.1 KiB
Markdown

# Finding Your Omada Customer ID (omadac_id)
## The Problem
If you're seeing this error:
```
Omada login failed: Controller ID not exist.
```
It means you're using the **wrong value** for `omadac_id` in the login request.
## The Solution
You need to find the **correct Customer/Controller ID** from your Omada OpenAPI settings.
## Step-by-Step Instructions
1. **Log into your Omada Cloud Controller** (using the same region as your URL, e.g., `euw1`)
2. **Navigate to OpenAPI Settings**:
- Go to **Settings****Platform Integration****Open API**
- Or: **Global View****Settings****Platform Integration****Open API**
3. **Find Your Application**:
- Look for your application in the list (the one with your `TP_LINK_CLIENT_ID`)
- Click **View** or **Details** on that application
4. **Find the Customer/Controller ID**:
- On the details screen, you should see:
- **Client ID** (this is your `TP_LINK_CLIENT_ID`)
- **Client Secret** (this is your `TP_LINK_CLIENT_SECRET`)
- **Customer ID** or **MSP ID** or **Controller ID** or **Omada ID / OmadacId**
- ⚠️ **This is the value you need!**
5. **Update Your `.env` File**:
```env
# Use the Customer/Controller ID from step 4
OMADA_CUSTOMER_ID=the-exact-value-from-openapi-settings
# Or for backward compatibility:
OMADA_ID=the-exact-value-from-openapi-settings
```
6. **Restart Your Application**:
```bash
pnpm run dev
```
## Important Notes
- The `OMADA_CUSTOMER_ID` is **different** from your `TP_LINK_CLIENT_ID`
- The `OMADA_CUSTOMER_ID` is the ID of your **controller/customer**, not your application
- This value is used as the `omadac_id` query parameter in the login request
- If you're using an MSP (Managed Service Provider) account, you might see "MSP ID" instead
## Verification
After updating, you should see:
- ✅ Login succeeds, OR
- ✅ A different error like "invalid username/password" (which means the ID is correct!)
If you still see "Controller ID not exist", double-check that you copied the **exact value** from the OpenAPI settings page.