Connect list from API

I’m trying to get this to work with not much luck. I’d basically like to disconnect someone from the connect list

mikrotik.Send(“/interface/wireless/connect-list/set”)
mikrotik.Send(“=interface=wlan1”)
mikrotik.Send(“=mac-address=00:15:6d:65:cb:f3=”)
mikrotik.Send(“=connect=no=”)
mikrotik.Send(“.tag=sss”, True)

Any thoughts? It says it’s done but nothing happens…

You need to use the id to edit the record. Something like this:

mikrotik.Send(“/interface/wireless/connect-list/set”)
mikrotik.Send(“=.id=*2ba”)
mikrotik.Send(“=interface=wlan1”)
mikrotik.Send(“=mac-address=00:15:6d:65:cb:f3”)
mikrotik.Send(“=connect=no”)
mikrotik.Send(“.tag=sss”, True)

I used *2ba as an example. You need to use ‘find’ to get the id of that record.
Or if you are adding this as a new record use ‘add’ rather than ‘set’ and remove the id line.

ADD: I also removed the extra ‘=’ from the end of the mac-address= and connect= statements. You use that last equal sign only if the parameter has no value.

Thanx.

which Id do you mean?

You will see the ids when you get the response from this request.

mikrotik.Send(“/interface/wireless/connect-list/print”)
mikrotik.Send(“=.tag=sss”, True)