Hotspot user creation through Java API

Hey guys,

I’ve been working in a small project for my company and I have to add user to the hotspot using java using the commands provided in the examples and the commands I use in the command line interface but I keep getting this message no such command

I’ve not found any clear example for doing this in java and I have tried lots of things but I don’t know what else to do, I’m kind of desperated, so if anyone can help me I will be very thankful

This is how I’m sending the command:

ret.sendCommand(“/ip/hotspot/user/add=name=melissa”);

thanks for your help.

ret.sendCommand(“/ip/hotspot/user/add”);
ret.sendCommand(“=name=melissa”);
ret.sendCommand(“=owner=admin”);

AFAIR, in that client, you need to send arguments alongside the command on a new line, i.e.

ret.sendCommand("/ip/hotspot/user/add\n=name=melissa");

ret.sendCommand(“/ip/hotspot/user/add\r\n=name=melissa\r\n=owner=admin”);

But wait… the owner isn’t required, is it?

SORRY!!! :open_mouth:

ehm… I have misreading… :confused:

/ip hotspot user → /tool user-manager user :laughing: