I’m trying to create a simple app using the RestAPI in wse-rest-library-php, but I’m getting an error. Please refer to the code and error log below.
PHP Version 7.4.9
PHP Code
use Com\Wowza\Entities\Application\Helpers\Settings;
use Com\Wowza\Entities\Application\StreamConfig;
use Com\Wowza\Application;
$setup = new Settings();
$setup->setHost('http://localhost:8087/v2');
$setup->setUsername('username'); //ex
$setup->setPassword('password'); //ex
$application = new Application($setup, 'test2live');
$streamingConfig = new StreamConfig();
$streamingConfig->setStreamType('live');
$streamingConfig->setURI($this->_application->getRestURI());
$streamingConfig->setLiveStreamPacketizer(['sanjosestreamingpacketizer', 'cupertinostreamingpacketizer']);
$response = $application->create($streamingConfig);
echo('<pre>');
var_dump($response);
echo('</pre>');
RESPONSE
{
["message"]=>
string(93) "The server encountered an unexpected condition which prevented it from fulfilling the request"
["success"]=>
bool(false)
["wowzaServer"]=>
string(5) "4.8.0"
["code"]=>
string(3) "500"
}
ERROR LOG:
{
["message"]=>
string(93) "The server encountered an unexpected condition which prevented it from fulfilling the request"
["success"]=>
bool(false)
["wowzaServer"]=>
string(5) "4.8.0"
["code"]=>
string(3) "500"
}