session function
root document
login
Query
/login?login=<login>&pass=<pass>&wth_acc=<with_acc>&with_cfg=<with_cfg>
Require parameters
login | - the login of the user |
pass | is the result of the function is MD5(MD5(login) + MD5(pass)), where: |
•login | - the login of the user |
•pass | – user password |
Other parameters
with_acc | Flag-modifier. If present in the answer is added the , |
a | similar answer to the call of the function get_account_info. |
with_cfg | Flag-modifier. If any answer is added in the section |
a | similar answer to the get_settings function call. |
user_agent | - the name of the client program. |
Description
Creates a new session to work with the service
Return section
sid-the | SID Value |
version-the | Version of the API. |
account-Contains | settings similar to the call answer function get_account_info. |
settings-Contains | settings similar to the settings of the answer to the function call |
get_settings. | Is present in the response only if the function call parameter ext. |
servertime-the | Current time (UNIXTIMESTAMP) servers |
Answer
<?xml
version="1.0" encoding="UTF-8"
standalone="yes"?><response><sid>4d553f8b0a45153cbb91c8b2f55b1cc2</sid><sid_name>icon</sid_name><media_key>ff818d1c50c2be654278cbc9d39bacc0</media_key><packet_expire>1292870680</packet_expire><version>0.6</version><account>…
</account><settings>...</settings><servertime>1292870500</servertime></response>
logout
Query
/logout?sid=<sid>
Description
Closes the current session
Each session has a lifetime setting. And if the logout method is not called, and in a period of time equal to the lifetime of the session has not been called, no work function, the session is considered stale and is automatically closed. After that for further work with the service the client is set again through the process of creating a new session.
Each session has a lifetime setting. And if the logout method is not called, and in a period of time equal to the lifetime of the session has not been called, no work function, the session is considered stale and is automatically closed. After that for further work with the service the client is set again through the process of creating a new session.
Answer
<?xml
version="1.0" encoding="UTF-8"
standalone="yes"?><response><message>OK</message><servertime>1292870500</servertime></response>
noop
Query
/noop?sid=<sid>
Description
Checks the current session and informs the server about client activity
The only feature not prolonging the current session.
The only feature not prolonging the current session.
Answer
<?xml
version="1.0" encoding="UTF-8"
standalone="yes"?><response><message>OK</message><servertime>1292870500</servertime></response>