Community discussions

MikroTik App
Topic Author
Posts: 28
Joined: Mon Sep 30, 2013 7:09 pm
Location: lebanon

Problem "add new user with profile" JAVA CODE

Sun Jan 31, 2016 9:38 am

I have coded a program in java to add user and profile - mikrotik 5.26- the user added but no Profile added
help PLZ
  this.ret.sendCommand("/tool/user-manager/user/add\n=name=" + Hotspot_User_Add.this.username + "\n=password=" + Hotspot_User_Add.this.password + "\n=customer=" + "admin");
                    this.ret.sendCommand("/tool/user-manager/user/create-and-activate-profile\n=profile=" + Hotspot_User_Add.this.profile_choosed + "\n=customer=" + "admin" + "\n=numbers=" + Hotspot_User_Add.this.username);
                    this.status = true;
just joined
Posts: 23
Joined: Wed Nov 03, 2010 4:05 pm
Location: South Africa

Re: Problem "add new user with profile" JAVA CODE

Tue Feb 23, 2016 12:03 pm

Don't use the example code from the wiki - it's difficult to use, requires intimate knowledge of the RouterOS API and doesn't really have error handling. Rather use this library: If you follow the examples in the README, you'll hopefully get further.
Gideon le Grange
RouterOS Java API:

Who is online

Users browsing this forum: Google [Bot], kvstudio6, rore and 10 guests