login
This function serves for your authorization to the system. Without calling this function in your session you will not be able to call most of other API functions.
| HTTP Method: | GET, POST | |
|---|---|---|
| Parameters: | uid | user id for client section access / admin username for admin section access |
| password | user password for client section access / admin password for admin section access | |
| Returns: | HTTP code | 200 (OK) |
| uid | user id / admin username | |
| sid | session id |
Returns user id (uid) and session id (sid), which serves as authorization to other functions. The session is valid for 20 minutes from the last function call.
Return errors
| Error code | HTTP response code | Description |
|---|---|---|
| 1 | 400 (Bad request) | Function was not performed, because all required parameters were not entered. Reply portion reply is empty. |
| 2 | 403 (Forbidden) | Unable to log in. Invalid uid or password. Reply portion reply is empty. |
CURL
curl for call method GET:
curl "https://admin.systems90.cz/api/login?uid=%uid%&password=%password%"
curl for call method POST:
curl -d"uid=%uid%&password=%password%" "https://admin.systems90.cz/api/login"
PHP Library
$api->login(%uid%, %password%);
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>You are logged in</text>
</status>
<uid>10623</uid>
<sid>5221j3sl8h7rc9dc7n0bn49n31</sid>
</reply>