REST API - auth.loginByToken

 

Get user session information, if user session hasn't expired.

 

 

Parameters

 

No parameters, except application and session parameter.

 

 

Authorization

 

  • Must be invoked within session!

 

Result

 

Result contains:

  • uid - logged user ID
  • session_key - public key of created session
  • api_server - URL of the API server for the future calls
  • auth_sig - An MD5 hash of the user+session_key+application_secret_key. It can be used for the simplified verification of the logged in user by your application server

 

Examples

 

Request : /auth/loginByToken?application_id=[Application ID]&session_key=[Session Key]&sig=[Signature]

 

XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:auth_loginByToken_response xmlns:ns2="https://api.rbkgames.com/">
   <ns2:uid>123</ns2:uid>
   <ns2:session_key>IGLKNJOKNQJSLTECIGFEEHHLJHGMIGJHGHIKJIGDIGFDEBHET</ns2:session_key>
   <ns2:api_server>https://api.rbkgames.com/</ns2:api_server>
   <ns2:auth_sig>xxxxxxxxxxxxxx</ns2:auth_sig>
</ns2:auth_loginByToken_response>

JSON

{
   "uid":"123",
   "session_key":"IGLKNJOKNQJSLTECIGFEEHHLJHGMIGJHGHIKJIGDIGFDEBHET",
   "api_server":"https://api.rbkgames.com/",
   "auth_sig":"xxxxxxxxxxxxxxxxxxxxxxx"
}
Помощь