LogMeIn API - getSession?

发布于 2024-08-20 05:45:42 字数 1722 浏览 5 评论 0原文

LogMeIn API 的“getSession”调用让我有点抓狂。根据他们的文档,您应该能够从 getHierarchy 调用中输入 iNodeID,或者从 LogMeIn 管理页面输入技术人员的 ID#,它将报告他们的打开会话信息,但无论我使用什么,我都会收到错误“ stdClass Object ( [getSessionResult] => getSession_InvalaidParam_NodeID )" 有人见过这个吗?

这是我的代码:

    <?php
    require("/usr/local/lib/php/nusoap/nusoap.php");
    $loginParams = array(
          'sEmail' => *hidden*,
          'sPassword' => *hidden*
          );
    $soapclient = new soapclient("https://secure.logmeinrescue.com/API/API.asmx?WSDL");
    $loginResult = $soapclient->login($loginParams);
    $hierparams = array(""=>"");
    $hierarchyResult = $soapclient->getHierarchy($hierparams);
    $hierarchy = $hierarchyResult->aHierarchy;
    $nodes = $hierarchy->HIERARCHY;
    $numberofnodes = count($nodes);
    echo "<table border =\"0\" cellspacing = \"5\">";
    for ($iNodes = 0; $iNodes < $numberofnodes; $iNodes += 1)
    {
      if($nodes[$iNodes]->eStatus == "Online" && $nodes[$iNodes]->eType == "Technician"){
        print_r("<tr>");
        print_r("<td>Name: " . $nodes[$iNodes]->sName . "<br /></td>");

 ####This works
        print_r("<td>ID: " . $nodes[$iNodes]->iNodeID . "<br /></td>");.
 ###############

        print_r("<td>Email: " . $nodes[$iNodes]->sEmail . "<br /></td>");

 ####This doesn't.
        $sessioninfo = $soapclient->getSession($nodes[$iNodes]->iNodeID);
 ################
        print_r("<td>Session Dump: ". print_r($sessioninfo) . "</td>");
        print_r("</td>");
       }
    }
    print_r("</table>");
    $soapclient->logout();
    ?>

The LogMeIn API's "getSession" call is driving me a bit crazy. According to their documentation, you should be able to input an iNodeID either from the getHierarchy call or just the tech's ID# from the LogMeIn admin page and it will report their open session information, but no matter what I use, I get an error "stdClass Object ( [getSessionResult] => getSession_InvalaidParam_NodeID )" Has anyone ever seen this?

Here is my code:

    <?php
    require("/usr/local/lib/php/nusoap/nusoap.php");
    $loginParams = array(
          'sEmail' => *hidden*,
          'sPassword' => *hidden*
          );
    $soapclient = new soapclient("https://secure.logmeinrescue.com/API/API.asmx?WSDL");
    $loginResult = $soapclient->login($loginParams);
    $hierparams = array(""=>"");
    $hierarchyResult = $soapclient->getHierarchy($hierparams);
    $hierarchy = $hierarchyResult->aHierarchy;
    $nodes = $hierarchy->HIERARCHY;
    $numberofnodes = count($nodes);
    echo "<table border =\"0\" cellspacing = \"5\">";
    for ($iNodes = 0; $iNodes < $numberofnodes; $iNodes += 1)
    {
      if($nodes[$iNodes]->eStatus == "Online" && $nodes[$iNodes]->eType == "Technician"){
        print_r("<tr>");
        print_r("<td>Name: " . $nodes[$iNodes]->sName . "<br /></td>");

 ####This works
        print_r("<td>ID: " . $nodes[$iNodes]->iNodeID . "<br /></td>");.
 ###############

        print_r("<td>Email: " . $nodes[$iNodes]->sEmail . "<br /></td>");

 ####This doesn't.
        $sessioninfo = $soapclient->getSession($nodes[$iNodes]->iNodeID);
 ################
        print_r("<td>Session Dump: ". print_r($sessioninfo) . "</td>");
        print_r("</td>");
       }
    }
    print_r("</table>");
    $soapclient->logout();
    ?>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅黛梨妆こ 2024-08-27 05:45:42

结果发现有一个参数被我忽略了,eNodeRef,它有一个默认参数“NODE”。

$iNodeID = $nodes[$iNodes]->iNodeID;
$eNodeRef = "NODE";
$sessionparams = array(
      'iNodeID' => $iNodeID,
      'eNodeRef' => $eNodeRef
      );
$sessionresult = $soapclient->getSession($sessionparams);

Turns out there was a parameter that I overlooked, eNodeRef, which has a default parameter of "NODE".

$iNodeID = $nodes[$iNodes]->iNodeID;
$eNodeRef = "NODE";
$sessionparams = array(
      'iNodeID' => $iNodeID,
      'eNodeRef' => $eNodeRef
      );
$sessionresult = $soapclient->getSession($sessionparams);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文