Счастье напрокат (tobe) wrote in lj_dev,
Счастье напрокат
tobe
lj_dev

LJ.XMLRPC.sessiongenerate and web-interface session cookie

Dear fellow members of lj-dev community, we have recently encountered problems with session-cookies while trying to access LJ via XML-RPC as documented in server reference. We're desperate and seek enlightenment.

Through LJ.XMLRPC.getchallenge we got challenge string which looks like his:
c0:{timestamp}:[0-9]{4}:[0-9]{2}:[0-9a-zA-Z]{20}:[0-9a-f]{34}
Then we experimented with both LJ.XMLRPC.login and LJ.XMLRPC.sessiongenerate methods, and as we understand, former fetches data about friend-groups and latter should've returned session cookie, which we would use in subsequent requests. Sessiongenerate indeed returned ljsession in the shape of string:
v1:u{userid}:s[0-9]{3}:[0-9a-zA-Z]{11}//Thanks+for+signing+in+/+LiveJournal+loves+you+a+lot+/+Here+have+a+cookie
"Yeah, and Thanks For All the Fish", we thought, and tried to connect to web-interface with received string but to no avail. We tried to combine cookies with different names (ljsession, ljloggedin, ljmastersession etc.), but nothing worked.

So... Major questions are: 1) What are we doing wrong, and 2) how do we obtain this session cookie via xml-rpc to access web-interface?

Thanks!
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments