OpenAPI v2 returning Controller ID not exist on Omada Controller v5.15.24.18

OpenAPI v2 returning Controller ID not exist on Omada Controller v5.15.24.18

OpenAPI v2 returning Controller ID not exist on Omada Controller v5.15.24.18
OpenAPI v2 returning Controller ID not exist on Omada Controller v5.15.24.18
2 weeks ago
Hardware Version:
Firmware Version: 5.15.24.18

Hello TP-Link Team,

I am trying to integrate my Omada Controller with Zabbix using the OpenAPI v2, but I always get the following error when querying sites or devices:


 

{"msg":"Controller ID not exist.","errorCode":-7131}

Steps I did:

  1. Created an OpenAPI client in Omada Controller (Client Credentials mode).

  2. Successfully obtained an access token via:

    
     

    /openapi/authorize/token?grant_type=client_credentials

  3. Verified that token is valid (otherwise I would get -44116).

  4. When calling sites or devices endpoints:

    
     

    GET /openapi/v2/sites?omadacId=<OmadaID_from_UI> GET /openapi/v2/sites/{siteId}/devices?omadacId=<OmadaID_from_UI>

    I always get -7131 Controller ID not exist.

What I tried:

  • Using the OmadaID shown in the UI → fails.

  • Using the controllerId seen in /api/info → same error.

  • Even tried the serverKey found in logs → still -7131.

  • Tried passing omadacId as query param, JSON body, and X-OmadacId header → all fail.

My Goal:

Monitor my EAP115 and ER605 devices (status, rxBytes, txBytes) via Zabbix using the Omada OpenAPI.

Question

  • Which value should be passed as omadacId in the v2 API endpoints on Controller v5.15.24.18?

  • Is there a known issue with OpenAPI -7131 on this version?

  • Is there a workaround or patch available?

  2      
  2      
#1
Options
3 Reply
Re:OpenAPI v2 returning Controller ID not exist on Omada Controller v5.15.24.18
2 weeks ago

Hi  @TI_Ctya 

 

Thanks for posting here.

 

Please test with both of the Modes and see if it helps.

 

 

  1  
  1  
#2
Options
Re:OpenAPI v2 returning Controller ID not exist on Omada Controller v5.15.24.18
2 weeks ago

 Hi @Vincent-TP , thanks for your answer.

I tested both modes as suggested:

  • Client Credentials mode:
    I can successfully obtain an access token. Example:

    
     

    {"errorCode":0,"msg":"Open API Get Access Token successfully.","result":{"accessToken":"AT-xxxx","expiresIn":7200}}

    So authentication works.

  • Authorization Code mode:
    Always fails with:

    
     

    {"errorCode":-44106,"msg":"The Client Id Or Client Secret is Invalid."}

    even when copying the values directly from the Controller Application page.

After getting a valid token with Client Credentials, I try to query the sites/devices API:


 

GET /openapi/v2/sites?omadacId=d3bbaf11a8fb38083f766018414645ab GET /openapi/v2/sites/{siteId}/devices?omadacId=d3bbaf11a8fb38083f766018414645ab

But the Controller always replies with:


 

{"msg":"Controller ID not exist.","errorCode":-7131}

I also tried:

  • passing the omadacId in query, JSON body, and headers (X-OmadacId) → always -7131.

  • using the controllerId and the serverKey from logs → same error.

So authentication works fine, but the OmadacId is never accepted, and the API cannot return any site or device.

  • Which exact value should be used as omadacId in Controller v5.15.24.18?

  • Is this a known bug in this firmware version?

Thanks in advance!

 

 

  1  
  1  
#3
Options
Re:OpenAPI v2 returning Controller ID not exist on Omada Controller v5.15.24.18
a week ago

Hi  @TI_Ctya 

 

Thanks for the reply.

 

Authorization Code mode:
Always fails with:

>>>>Please provide the following complete information for troubleshooting:
Complete API Request Example
API Parameters on the Controller

 

So authentication works fine, but the OmadacId is never accepted, and the API cannot return any site or device.

>>>

This is a v1 interface, but you're calling a v2 API. Please refer to the API documentation for the correct version.

 

  0  
  0  
#4
Options