Since March 10, 2003 - Version 2.1
MSN Messenger Protocol | ||||||||||||||||||||||||||||||||||||||||||||
|
OverviewThis page illustrates what an entire notification session might look like. This page does not (yet) exhaustively show every command that can be sent to a notification server. Conventions Used on This PageThroughout this page, the protocol is displayed from the point of view of Alice's (alice@passport.com) client. ExampleLogging in - messenger.hotmail.comThe client (alice@passport.com) connects to
Having successfully negotiated a protocol version, the client gives its protocol version information.
Alice's client attempts to authenticate itself. However, the server redirects it to
Logging in - baym-cs118.msgr.hotmail.comThe client (alice@passport.com) connects to
The client gives its protocol version information again.
Alice's client attempts to authenticate itself, and the server returns a long string for use in Passport authentication.
Alice authenticates with MS Passport (see the authentication example page), then replies with her ticket.
Alice has now successfully logged into the notification server. Her client might remember to log straight into
SynchronisingAlice's client now synchronises her local copy of her contact lists with the copy held on the server. Last time Alice's client logged on, the list was at version number 6 but the list has now jumped to version number 27.
Because the list versions don't match, the server sends all of Alice's of contact information (not just what's changed between versions 6 and 27). At first, the server sends one message in every packet of data.
Then, the server sends the entire group list in a single packet. Since Alice's client is written in a programming language that handles incoming data one packet at a time, it has to separate these lines out and handle them one at a time.
Then the server sends Alice's contact list. The first person in her contact list is Bob, whose nickname is "Bob". He's on her forward, block, and reverse lists. He hasn't chosen to share any phone numbers, but does have an MSN mobile device we can use. His details are all sent in a single packet, which we have to separate out and handle individually.
The second person in Alice's list is Carol, whose nickname is "Carol". She has shared her work phone number (9876-54321), but no other information. Unfortunately, the server sends Carol's details in two packets, split in the middle of a command. Alice's client will have to reconstruct the lines of data before handling them.
Then, the server sends details for Dave. Dave is just on Alice's forward list. He's in her "Coworkers", "Friends", and "Family" groups. He's set his home phone number to "3.1415926535", his work phone number to "2.71841844", and his mobile number to "sqrt(-1)". The server has cut his details into several packets.
Next, the server sends information about Eve (the evil eavesdropper), who has been blocked from seeing Alice's presence.
Finally, the server sends details about Fred, who must have been recently added, as he is on Alice's reverse list but not her add or block list.
Here is a summary of who will receive whose presence:
Initial presenceNow Alice has synchronised her contact lists, she sends her initial presence, and at the same time allows Fred to see her presence information. The presence command causes the server to send presence information for Alice's contacts that are currently online. Notice how the
ChallengeThe server challenges Alice's client with the string "29409134351025259292".
Alice's client adds "Q1P7W2E4J9R8U3S5" to the end of this string, to produce "29409134351025259292Q1P7W2E4J9R8U3S5". The MD5 digest of that string is "d0c1178c689350104350d99f8c36ed9c".
The server accepts Alice's response to this challenge.
More presence changesAlice walks away from her computer. After a few minutes, Alice's client sets her online state to "idle".
While Alice is away, Bob goes offline.
When Alices returns, her client sets her online state to "online".
Shortly afterwards, Carol changes her online state to "Busy", and changes her display name.
Nickname changesBecause Carol changed her display name with her last change of online state, Alice's client updates Carol's nickname to match.
Alice decides that she doesn't want Bob to see here presence information any longer, so her client removes him from her allow list, and adds him to her block list.
Log outFinally, Alice decides to log out of MSN Messenger.
|