Can't set client rate limit with controller API
Can't set client rate limit with controller API
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.
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
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.
- Copy Link
- Report Inappropriate Content
@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
- Copy Link
- Report Inappropriate Content
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
- Copy Link
- Report Inappropriate Content
@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
- Copy Link
- Report Inappropriate Content
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:

- Copy Link
- Report Inappropriate Content
@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.
- Copy Link
- Report Inappropriate Content
@Vincent-TP Still an issue on 6.0.0.23
"{'errorCode': -1001, 'msg': 'Parameter [mode] could not be null.\n'}"
- Copy Link
- Report Inappropriate Content
- Copy Link
- Report Inappropriate Content
@Vincent-TP exactly. In the API guide, there's no mention/documentation for "mode". How do I file a bug report?
- Copy Link
- Report Inappropriate Content
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?
- Copy Link
- Report Inappropriate Content
Information
Helpful: 1
Views: 511
Replies: 12


