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'.


Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting