powered by Jive Software

I can't configure openfire rest api gidkom php with my server

I m getting a error like this

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: POST http://148.72.251.175:http//opf.pissaya.info:9090http://opf.pissaya.info:9090/pl ugins/restapi/rest-api.jsp/users resulted in a 400 Bad Request response: 400 Bad Request

Bad Req (truncated…) in E:\XAMPP\htdocs\gidkom\vendor\guzzlehttp\guzzle\src\Exception\RequestException. php:111 Stack trace: #0 E:\XAMPP\htdocs\gidkom\vendor\guzzlehttp\guzzle\src\Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 E:\XAMPP\htdocs\gidkom\vendor\guzzlehttp\promises\src\Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response)) #2 E:\XAMPP\htdocs\gidkom\vendor\guzzlehttp\promises\src\Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 E:\XAMPP\htdocs\gidkom\vendor\guzzlehttp\promises\src\Task in E:\XAMPP\htdocs\gidkom\vendor\guzzlehttp\guzzle\src\Exception\RequestException.p hp on line 111

Here my code is

**<?php **

include “vendor/autoload.php”;

$api = new Gidkom\OpenFireRestApi\OpenFireRestApi;

$api->secret = “supersecret”; //just don’t want to show actual secret key

$api->host = “148.72.251.175”;

$api->port = “http://opf.pissaya.info:9090”; // default 9090

$api->useSSL = false;

**$api->plugin = “http://opf.pissaya.info:9090/plugins/restapi/rest-api.jsp”; // plugin **

$result = $api->addUser(‘root’, ‘root’, ‘Root’, ‘root@gmail.com’);

if($result[‘status’]) {

** // Display result, and check if it’s an error or correct response**

** echo 'Success: ';**

** echo $result[‘message’];**

} else {

** // Something went wrong, probably connection issues**

** echo 'Error: ';**

** echo $result[‘message’];**

}

?>

**Please help me **
It’s been 3 month for my chat project and i cant find any fix , I m so frustrated