vlion: cut of the flammarion woodcut, colored (Default)
vlion ([personal profile] vlion) wrote in [site community profile] dw_dev_training2014-11-17 09:55 pm
Entry tags:

HOWTO: Dreamwidth API

HOWTO Use the Dreamwidth API

DW endpoint: "https://www.dreamwidth.org/interface/xmlrpc"

Invoke LJ.XMLRPC.getchallenge on the endpoint, receiving something like...

"auth_scheme" :STRING "c0"
"server_time" :INTEGER <epoch time>
"challenge" :STRING "c0:1416283200:2410:60:4QoGWOXV0uB9gBaZ0LB0:5a1901a0feccabcb30fbe6e85878f758")
"expire_time" :INTEGER <epoch time>))

Pick challenge out, md5_hex[0] the challenge concatenated with the md5_hex of the account password; call the result response.

response = md5(concat(challenge, md5(password)))

Then, for function in the API, invoke LJ.RPC.function using auth_method = challenge and auth_response = response.

Proceed as appropriate for said function

[0] .. digest in hexadecimal form. The length of the returned string will be 32 and it will only contain characters from this set: '0'..'9' and 'a'..'f'.

kaberett: Trans symbol with Swiss Army knife tools at other positions around the central circle. (Default)

[personal profile] kaberett 2014-11-18 11:18 am (UTC)(link)
(is this in the wiki? I can make it be if it's not)
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2014-11-18 03:25 pm (UTC)(link)
There's also http://www.livejournal.com/doc/server/ljp.csp.protocol.html which is .... mostly still applicable. :)
momijizukamori: Grey tabby cat with paws on keyboard and mouse. The text reads 'code cat is on the job', lolcats-style (CODE CAT)

[personal profile] momijizukamori 2014-11-18 04:45 pm (UTC)(link)
And makes me cry inside every time I think about writing comment-count scripts.