I encounter a problem when I add a user using RestApi
include "vendor/autoload.php";
$api = new Gidkom\OpenFireRestApi\OpenFireRestApi;
$api->secret = "mySecretKey";
$api->host = "HostName";
$api->port = "9090";
$api->useSSL = false;
$api->plugin = "/plugins/restapi/v1";
To add a user to the list, I use the following code
$jid="xyz@domainname";
$data=$api->addToRoster("abc", $jid);
Which points to OpenFireRestApi.phpwhich have a function namedaddToRoster
/**
* Adds to this OpenFire user roster
*
* @param string $username Username
* @param string $jid JID
* @param string|false $name Name (Optional)
* @param int|false $subscription Subscription (Optional)
* @return json|false Json with data or error, or False when something went fully wrong
*/
public function addToRoster($username, $jid, $name=false, $subscription=false)
{
$endpoint = '/users/'.$username.'/roster';
return $this->doRequest('post', $endpoint, compact('jid','name','subscription'));
}
So I used
$data=$api->addToRoster("abc", $jid,"DummyName",3);
Where 3 is the type of subscription, as indicated as = 3, which is indicated
But when I add, the user shows the type of subscription as none .
UPDATE
I found out about the subscription plugin
So, I installed the plugin to configure it

The plugin itself says that it will be automatically signed in both directions.
Subsequently, I tried again
$data=$api->addToRoster("abc", $jid);
What are the aspects of work, but again the subscription, none .
Any help would be appreciated.