Omada portal client app

Omada portal client app

Omada portal client app
Omada portal client app
Saturday

Hi, I’ve developed a client app that displays the remaining time for connected users in voucher mode. Since I don’t have much time at the moment, I’m considering sharing my code in case anyone is interested in continuing the project. The app is built with Flutter.
Here’s the repo link: https://github.com/yowgerald/omada-portal-client

Please feel free to ask me if you encounter any problems while setting up or testing. Thank you!

 

 

  1      
  1      
#1
Options
4 Reply
Re:Omada portal client app
Monday - last edited Monday

Hi Thanks for sharing. I'm a developer but not familiar with flutter.
Is it intended for mobile platform or can it work everywhere?

Can you give me a brief explanation of the technical principle you used please?
At first glance, it seems that you are using an undocumented v2 API and searching information based on the MAC address in the link

Thanks in advance

  0  
  0  
#3
Options
Re:Omada portal client app
Tuesday

  @tlt Hi, 
 

I based my API endpoints on the information found here:

https://community.tp-link.com/en/business/forum/topic/590430
In my case, I'm using V5.4.6.

 

Theoretically, this should also work on the web. You need to get the client's Wi-Fi MAC address or Wi-Fi IP.

  0  
  0  
#4
Options
Re:Omada portal client app
Tuesday

  @tlt

Here are the API endpoints used.
Please note that you may not need endpoint #2 if you can obtain the Wi-Fi MAC address on your webpage. In that case, you can proceed to endpoint #3 directly.
Also, you will need to obtain these controller data to proceed in using the endpoints.

OMADA_URL="https://192.168.0.x:8043"
CONTROLLER_ID=""
SITE_ID=""
USERNAME=""
PASSWORD=""
 

  1. Login Endpoint:

    • Method: POST
    • URL: '{omadaUrl}/{controllerId}/api/v2/login'
    • Purpose: Used to authenticate the user with the username and password, and obtain an authentication token (authToken).
  2. Fetch Client Data (by IP):

    • Method: GET
    • URL: '{omadaUrl}/{controllerId}/api/v2/sites/{siteId}/clients?&token={authToken}&searchKey={wifiIp}&sorts.end=desc&filters.active=true&currentPage=1&currentPageSize=1'
    • Purpose: Retrieves the client data (such as MAC address) using the Wi-Fi IP address of the device.
  3. Fetch Remaining Time (by MAC):

    • Method: GET
    • URL: '{omadaUrl}/{controllerId}/api/v2/hotspot/sites/{siteId}/clients?searchKey={mac}&sorts.end=desc&token={authToken}&currentPage=1&currentPageSize=1'
    • Purpose: Retrieves the remaining time of the user's session based on the client's MAC address.
       
  1  
  1  
#5
Options
Re:Omada portal client app
Yesterday

  Thank you for the information. I appreciate it

  0  
  0  
#6
Options