thanks for the reply. I am aware of this wiki page and I am trying to use $gw->login to get the sessionID in my code.
发自我的 iPhone > 在 2017年3月1日,03:49,aliyun <[email protected]> 写道: > > https://github.com/openmeetings/openmeetings-api-plugin/wiki > > Sent from China Unicom 4G TD-LTE > >> 在 2017年3月1日,01:52,由超 <[email protected]> 写道: >> >> I setup my OM on my Mac. user admin can login successfully. When I use the >> php API, I get error message as: >> <h2>Error While signing into OpenMeetings, please check >> credentials</h2><pre>-10</pre> >> Failed to login >> >> My OM admin URL is : http://localhost:5080/openmeetings/#user/dashboard >> >> the following is my code. Thanks for any advice. >> >> <pre> >> <?php >> require_once '../scripts/OmGateway.php'; >> >> $gw = new OmGateway(array( >> 'protocol' => 'http', >> 'host' => 'localhost', >> 'port' => '5080', >> 'context' => 'openmeetings', >> 'user' => 'admin', >> 'pass' => 'admin', >> 'module' => 'api_test' >> )); >> if ($gw->login()) { >> echo "login successfully"; >> } else { >> die("\nFailed to login\n"); >> } >> </pre>
