Flat Client/Server Protocol Reference

This is a reference to the “flat” interface to LiveJournal, where “flat” is simply a term describing the raw HTTP request sent to a LiveJournal server.

This interface passes simple key/value pairs for each request and response. Its advantage is that parsing the server response(s), if you need to do it yourself, is easy. As an alternative, there is an XML-RPC Interface [16]This returns the data in a predetermined (nested) format, which is easier to work with directly.

Table of Contents

checkfriends — Mode that clients can use to poll the server to see if their Friends list has been updated. This request is extremely quick, and is the preferred way for users to see when their Friends list is updated, rather than pounding on reload in their browser, which is stressful on the servers.
consolecommand — Run an administrative command. The LiveJournal server has a text-based shell-like administration console where less-often used commands can be entered. There is a web interface to this shell online; this is another gateway to that. The mode is limited to one server-parsed command only. The command should be sent with double quotes around any arguments with spaces, with double quotes escaped by backslashes, and backslashes escaped with backslashes. Optionally, you can send a listref instead of a string for this argument, in which case, we will use your argument separation and not parse it ourselves.
editevent — Edit or delete a user's past journal entry
editfriendgroups — Edit the user's defined groups of friends.
editfriends — Add, edit, or delete friends from the user's Friends list.
friendof — Returns a list of which other LiveJournal users list this user as their friend.
getchallenge — Generate a one-time, quick expiration challenge to be used in challenge/response authentication methods.
getdaycounts — This mode retrieves the number of journal entries per day. Useful for populating calendar widgets in GUI clients.
getevents — Download parts of the user's journal. See also syncitems protocol mode.
getfriendgroups — Retrieves a list of the user's defined groups of friends.
getfriends — Returns a list of which other LiveJournal users this user lists as their friend.
getusertags — Retrieves a list of the user's defined tags.
login — Log in to the server, while announcing your client version. The server returns with whether the password is good or not, the user's name, an optional message to be displayed to the user, and the list of the user's friend groups. (friend groups can also be retrieved using the getfriendgroups mode)
postevent — The most important mode, this is how a user actually submits a new log entry to the server.
sessionexpire — Expires one or more sessions that a user has active within the system. This can be used to log a user out of any browsers they are logged in from, as well as to cancel any sessions created with the sessionexpire mode.
sessiongenerate — Generates a session that can be used to setup a cookie for accessing the site with a user's privileges.
syncitems — Returns a list (or part of a list) of all the items (journal entries, to-do items, comments) that have been created or updated on LiveJournal since you last downloaded them. Note that the items themselves are not returned --- only the item type and the item number. After you get this you have to go fetch the items using another protocol mode. For journal entries (type "L"), use the getevents mode with a selecttype of "syncitems".

[16] XML-RPC is something most programming languages have a library for. Check http://www.xmlrpc.com/directory/1568/implementations[o] to see if there is an implementation for your language of choice.