ari_linn: (warrior - normal)
[personal profile] ari_linn
How do I get post comments through the API? I can get posts with LJ.XMLRPC.getevents, and in the original LJ there's a method called LJ.XMLRPC.getcomments, but when I tried it on DW API, I got "Client error: Unknown method". Not nice.
vlion: cut of the flammarion woodcut, colored (Default)
[personal profile] vlion

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

Profile

dw_dev_training: The stylised 'd', with the word 'dev' above, and the word 'training' at the side, representing the dw_dev_training comm. (Default)
Dreamwidth Development Training

September 2022

S M T W T F S
    123
45678910
1112131415 1617
18192021222324
252627282930 

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 6th, 2025 10:17 am
Powered by Dreamwidth Studios