API Add User - PHP

Hi,

I’m trying to add a user thorugh the API using PHP. Here is my code. I have tried some variations on this, and can’t seem to get any of them working. (Left out the connect part and so on, this is working fine,its just not adding the user)Any suggestions.

$API->write('/user/add',false);
$API->write('=name=',false);
$API->write('=test=',false);
$API->write('=password=',false);
$API->write('=test0331=',false);
$API->write('=group=',false);
$API->write('=write=');

Thanks

maybe something like

$API->write('/user/add',false);
$API->write('=name=test=',false);
$API->write('=password=test0331=',false);
$API->write('=group=write=');

?..

indeed, API command consists of 4 major parts
pat to command is always followed by command
and argument is always followed by value

//
==

eg:

/ip/address/print
=follow=1

where path to command is /ip address/ command is print and follow is argument and 1 is the value of the argument

oops, this command notifies when addresses was added or changed, but it says nothing when address was deleted, unlike ‘/ip/address/listen’. v3.22

p.s. ‘=follow=’ works with any argument. even without an argument =)

yes, but it is easier to remember that you have to add something every time, that memorize all the exception where you can omit the value.

will that be fixed in 3.23 ?