Difference between revisions of "MOR API user login"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: Line 1:
[[MOR API]]
[[MOR API]] Logs in user into MOR
 
Logs in user into MOR
 
 


==Request==
==Request==
Line 35: Line 31:


==Customer redirect==
==Customer redirect==
<!---This functionality is available from MOR 9--->
To redirect customer to MOR Billing main site go to: '''SETTINGS -> Setup -> Settings -> API''' and check the marked option:
To redirect customer to MOR Billing main site go to: '''SETTINGS -> Setup -> Settings -> API''' and check the marked option:
<br><br>
<br><br>

Revision as of 09:36, 23 January 2013

MOR API Logs in user into MOR

Request

HTML POST: http://<SERVER_IP>/billing/api/login?u=username&p=password

Result

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <action>
   <name>login</name>
   <status>ok</status>
   <user_id>54</user_id>    #this line was added on MOR11
 </action>

Everything is ok. User is logged in to the system.


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <action>
   <name>login</name>
   <status>failed</status>
 </action>

This means that wrong username and/or password and user can't be authenticated.



Customer redirect

To redirect customer to MOR Billing main site go to: SETTINGS -> Setup -> Settings -> API and check the marked option:

Mor api redirect.png

If login over API is successful the customer will be redirected to MOR Billing main site.

If login is not successful :

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <action>
   <name>login</name>
   <status>failed</status>
 </action>

This means that wrong username and/or password and user can't be authenticated.