Can't set client rate limit with controller API

Can't set client rate limit with controller API

Can't set client rate limit with controller API
Can't set client rate limit with controller API
2025-09-26 19:11:11 - last edited 2 weeks ago
Hardware Version: V1
Firmware Version: 5.15.24.19

I'm trying to set a client's rate limit through the api (with python), but I keep getting a weird error message: 

{"errorCode":-1001,"msg":"Parameter [mode] could not be null.\n"}

This error code isn't in the API documentation. I'll post the code in a comment below.

 

I feel like I have everything set IAW the documentation, but I'm kind of at a loss here. I've tried it with the mac address both in upper and lower case, same error. Tried changing the "true" to True and 1, same error. Other API calls works, it's just rate limit that is giving me issues.

  1      
  1      
#1
Options
12 Reply
Re:Can't set client rate limit with controller API
2025-09-26 19:16:27

I can't seem to post the code, forum says it contains illegal links even though it's just python code. Maybe because my forum account is too new.

  0  
  0  
#2
Options
Re:Can't set client rate limit with controller API
2025-09-27 14:27:53

@Vincent-TP I think this is actually a bug, or undocumented thing in the api. Can someone take a look at the attached curl output.

https://gist.github.com/CyberAustin/d2fbb4fb26d01a239e51aab127bee2d8

 

  0  
  0  
#3
Options
Re:Can't set client rate limit with controller API
3 weeks ago

  @CyberAustin 

I’ve run into that exact error before turns out the "mode" parameter is required even if the docs don’t make it clear. Try explicitly setting "mode": "custom" or whatever value fits your use case. That fixed it for me. Let us know if that helps! for more visit : https://bit.ly/4o8UPfL

  0  
  0  
#4
Options
Re:Can't set client rate limit with controller API
3 weeks ago

  @lucabranz71 There's no value to "fit my case" because if it is "mode":"" then I get [mode] could not be null, but if I do "mode":"custom/or anything" then it's 400: Bad Request

  0  
  0  
#5
Options
Re:Can't set client rate limit with controller API
2 weeks ago - last edited 2 weeks ago

Hi  @CyberAustin 

 

Thanks for posting here.

We have a pre-release version, you may install it and see if the situation persists:

https://community.tp-link.com/en/business/forum/topic/840402

 

 

What's more, please make sure the API document you are referring to is from the controller's interface:

 

 

  0  
  0  
#6
Options
Re:Can't set client rate limit with controller API
2 weeks ago

  @Vincent-TP I have verified that this "mode" is not documented in the API documentation on the controller itself. I will look into the beta controller and see if it's still an issue.

  0  
  0  
#7
Options
Re:Can't set client rate limit with controller API
2 weeks ago

  @Vincent-TP Still an issue on 6.0.0.23

"{'errorCode': -1001, 'msg': 'Parameter [mode] could not be null.\n'}"

  0  
  0  
#8
Options
Re:Can't set client rate limit with controller API
2 weeks ago - last edited 2 weeks ago

  @CyberAustin 

 

This is the related guide I found from the API document:

 

  0  
  0  
#9
Options
Re:Can't set client rate limit with controller API
2 weeks ago

  @Vincent-TP exactly. In the API guide, there's no mention/documentation for "mode". How do I file a bug report?

  0  
  0  
#10
Options
Re:Can't set client rate limit with controller API
2 weeks ago

  @CyberAustin 

 

Sorry, I didn't look carefully before. Before the report, please give me some time to confirm this situation. Thanks.

CyberAustin wrote

  @Vincent-TP exactly. In the API guide, there's no mention/documentation for "mode". How do I file a bug report?

 

  0  
  0  
#11
Options