Announcement

Collapse
No announcement yet.

Open X-Change login error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Open X-Change login error

    Hello,
    i'm trying to develop an external application that uses the Open X-Change HTTP-API. For first, i want to list the root-directories of a user like this:



    => JSON result: {"session":"f70ad4bd50295a60e5f8b4b0ca175146","ran dom":"1218643885724"}



    => empty page (=> no error?)



    => JSON result:

    {"code":"SES-0205","error_id":"-427850375-67","category":3,"error_params":[],"error":"Wrong client IP address."}


    Does anybody know where's the failure? Do i understand the "OX-HE-Authentication-Sessionhandling.pdf" right or is
    that a wrong way to use the HTTP API?

    Tanks for any help,

    Jan

  • #2
    Originally posted by NajEkniets View Post
    Hello,
    i'm trying to develop an external application that uses the Open X-Change HTTP-API. For first, i want to list the root-directories of a user like this:



    => JSON result: {"session":"f70ad4bd50295a60e5f8b4b0ca175146","ran dom":"1218643885724"}



    => empty page (=> no error?)



    => JSON result:

    {"code":"SES-0205","error_id":"-427850375-67","category":3,"error_params":[],"error":"Wrong client IP address."}


    Does anybody know where's the failure? Do i understand the "OX-HE-Authentication-Sessionhandling.pdf" right or is
    that a wrong way to use the HTTP API?

    Tanks for any help,

    Jan
    Hi jan,

    what are you trying to achieve? Do you want to create an external "Login" Application or for example an PHP/JSP App which log into OX and list some Folders/Objects? The Easylogin PDF only applies if you want to write an external "Login" instead of the normal OX GUI Loginmask.

    Example 1:

    If you want a user to log into your PHP/JSP App and he should see a list of his contacts you should do within PHP or JSP:

    Simulate login with :

    "ajax/login?action=login&name=MyUser&password=MyPass"

    save the sessionid AND the cookie information which come with the json response.

    Fetch a list of folders with:

    ajax/folders?action=root&columns=1&session=<SESSIONID_F ROM_LOGIN_RESPONSE>

    make sure you include the Open-Xchange Cookie & JSESSIONID Cookie in this and furher requests.


    Example 2:

    You have a Customer Self Service Webgui where your customer logs in and he can use a bunch of Webservices and you want that the customer can click "Open-Xchange Webmail" and he will be redirected straight to the OX WEBGUI without loggin into OX again because he was already "authed" at your Customer Self Service Webgui.

    This is currently possible via a simple javascript file, which must be placed on the same WEB Server where OX run on. This must be done, becaue OX has a CLIENT IP Check it the "easylogin/redirect" Method. Which means that the IP which creates the "sessionid" and the OX Cookie etc. must be the same in all further requests. So its the easiest way to place a Javascript file on the OX Server which is used by the Customers Browser. In this case the Browser executes the javascript which then makes a "login" and the browser automatically gets the required cookie and sessionid which is needed to work with the webgui.

    I hope i could clarify some general things regarding the HTTP JSON API. If not, dont hesitate to ask us....

    Regards,

    Manuel Kraft

    Comment


    • #3
      Originally posted by NajEkniets View Post
      Hello,
      i'm trying to develop an external application that uses the Open X-Change HTTP-API. For first, i want to list the root-directories of a user like this:



      => JSON result: {"session":"f70ad4bd50295a60e5f8b4b0ca175146","ran dom":"1218643885724"}



      => empty page (=> no error?)



      => JSON result:

      {"code":"SES-0205","error_id":"-427850375-67","category":3,"error_params":[],"error":"Wrong client IP address."}


      Does anybody know where's the failure? Do i understand the "OX-HE-Authentication-Sessionhandling.pdf" right or is
      that a wrong way to use the HTTP API?

      Tanks for any help,

      Jan

      Here is the JAVASCRIPT example i mentioned in my post:

      Comment

      Working...
      X