Client/Server Protocol

Currently there are a few types of interfaces available to the LiveJournal protocol: the older "flat" interface, the custom XML-RPC interface, and a modified version of the Blogger API. The XMLRPC interface is probably easiest to use, because there are quite a few XML-RPC resources available to developers in just about any programming language. If you're in a situation that requires you to write your own interface wrapper, then the flat interface is probably best to use.

Tip

Internally, all interfaces are just wrappers around the same functions. Don't worry too much about which one you use, as they accomplish the same thing.

Table of Contents

8. Client / Server Protocol - Quick Reference
1. Introduction to the Protocol
2. Working with Proxies
9. Authentication in the Client Server Protocol
1. Clear
2. HTTP Cookies
3. Challenge / Response
I. Flat Client/Server Protocol Reference
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 serves.
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.
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.
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".
II. XML-RPC Client/Server Protocol Reference
checkfriends - Checks to see if your friends list has been updated since a specified time.
consolecommand - Run an administrative command.
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 server challenge string for authentication.
getdaycounts - This mode retrieves the number of journal entries per day.
getevents - Download parts of the user's journal.
getfriends - Returns a list of which other LiveJournal users this user lists as their friend.
getfriendgroups - Retrieves a list of the user's defined groups of friends.
login - validate user's password and get base information needed for client to function
postevent - The most important mode, this is how a user actually submits a new log entry to the server.
sessionexpire - Expires session cookies.
sessiongenerate - Generate a session cookie.
syncitems - Returns a list of all the items that have been created or updated for a user.
10. Supporting the Blogger API
11. Protocol Versions
12. Journal Item Meta-data
A. Frequently Asked Questions