Protocols/MSNP/MSNP13/Example Session: Difference between revisions
m (Added a link to an orphaned page) |
m (1 revision imported) |
||
(No difference)
|
Revision as of 00:23, 29 May 2020
Overview ·
Changes · Challenges · Sharing Folders · Example Session
SOAP Address Book: Retrieving the lists · Updating the membership lists · Updating the AB
Other features using SOAP: Offline Messaging · Passport 3.0 authentication
Overview
This 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. Copied from the MSNP11 example session.
Conventions Used on This Page
Throughout this page, the protocol is displayed from the point of view of Alice's (alice@hotmail.com) client.
Example
Logging in - muser.messenger.hotmail.com
The client (alice@hotmail.com) connects to muser.messenger.hotmail.com(BETA server) on TCP port 1863. The client understands protocol version 13. It also supports CVR0.
>>> VER 1 MSNP13 CVR0\r\n
<<< VER 1 MSNP13 CVR0\r\n
Having successfully negotiated a protocol version, the client gives its protocol version information.
>>> CVR 2 0x0409 winnt 5.1 i386 MSG80BETA 8.0.0566 msmsgs alice@hotmail.com\r\n
<<< CVR 2 8.0.0566 8.0.0566 8.0.0566 http://msgr.dlservice.microsoft.com/download/4/5/b/45beb06f-5a08-4694-abd8-d6e706b06b68/Install_Messenger_Beta.exe http://ideas.live.com\r\n
Alice's client attempts to authenticate itself. However, the server redirects it to baym-cs118.msgr.hotmail.com (IP address 207.46.107.95), port 1863.
>>> USR 3 TWN I alice@hotmail.com\r\n
<<< XFR 3 NS 207.46.107.95:1863 U D\r\n
Logging in - baym-cs295.msgr.hotmail.com
The client (alice@hotmail.com) connects to baym-cs295.msgr.hotmail.com on TCP port 1863. The client understands protocol version 13, and supports CVR0.
>>> VER 4 MSNP13 CVR0\r\n
<<< VER 4 MSNP13 CVR0\r\n
The client gives its protocol version information again.
>>> CVR 5 0x0409 winnt 5.1 i386 MSG80BETA 8.0.0566 msmsgs alice@hotmail.com\r\n
<<< CVR 5 8.0.0566 8.0.0566 8.0.0566 http://msgr.dlservice.microsoft.com/download/4/5/b/45beb06f-5a08-4694-abd8-d6e706b06b68/Install_Messenger_Beta.exe http://ideas.live.com\r\n
Alice's client attempts to authenticate itself, and the server returns a long string for use in Passport authentication.
>>> USR 6 TWN I alice@hotmail.com\r\n
<<< USR 6 TWN S lc=1033,id=507,tw=40,fs=1,ru=http%3A%2F%2Fmessenger%2Emsn%2Ecom,ct=1062764229,kpp=1,kv=5,ver=2.1.0173.1,tpf=43f8a4c8ed940c04e3740be46c4d1619\r\n
The server will also return the "Policies" file after the Tweener invitation.
<<< GCF 0 165 <Policies> <Policy type="SHIELDS"> <config> <shield> <cli maj="7" min="0" minbld="0" maxbld="9999" deny=" " /> </shield> <block> </block> </config> </Policy> </Policies>
Alice authenticates with MS Passport (see the authentication example page), then replies with her ticket.
>>> USR 7 TWN S t=53*1hAu8ADuD3TEwdXoOMi08sD*2!cMrntTwVMTjoB3p6stWTqzbkKZPVQzA5NOt19SLI60PY!b8K4YhC!Ooo5ug$$&p=5eKBBC!yBH6ex5mftp!a9DrSb0B3hU8aqAWpaPn07iCGBw5akemiWSd7t2ot!okPvIR!Wqk!MKvi1IMpxfhkao9wpxlMWYAZ!DqRfACmyQGG112Bp9xrk04!BVBUa9*H9mJLoWw39m63YQRE1yHnYNv08nyz43D3OnMcaCoeSaEHVM7LpR*LWDme29qq2X3j8N\r\n
<<< USR 7 OK alice@hotmail.com 1 0\r\n
Don't know what SBS means...
<<< SBS 0 null\r\n
Alice has now successfully logged into the notification server. Her client might remember to log straight into baym-cs295.msgr.hotmail.com next time it connects to MSN Messenger, instead of going through messenger.hotmail.com. The server then sends Alice's profile details. You should keep a copy on important information such as EmailEnabled, LoginTime, MSPAuth.
<<< MSG Hotmail Hotmail 478\r\n MIME-Version: 1.0\r\n Content-Type: text/x-msmsgsprofile; charset=UTF-8\r\n LoginTime: 1115349389\r\n EmailEnabled: 1\r\n MemberIdHigh: 83936\r\n MemberIdLow: 1113138176\r\n lang_preference: 1036\r\n preferredEmail: \r\n country: CA\r\n PostalCode: \r\n Gender: \r\n Kid: 0\r\n Age: \r\n BDayPre: \r\n Birthday: \r\n Wallet: \r\n Flags: 69643\r\n sid: 507\r\n kv: 6\r\n MSPAuth: 6Z1iKIC0bBbNlgb87D2SA1w3PNeweF7DyrUCimEnMdj1hrPLLMlDq5Hm1z0y9Kst92*My3jsIxVZ4VDG8TgBtyfw$$\r\n ClientIP: 24.111.111.111\r\n ClientPort: 60712\r\n ABCHMigrated: 1\r\n BetaInvites: 30\r\n \r\n
Retrieve memberships
Now that the client get it's initial profile message, it's time to retrieve the contact list.
Retrieve memberships is the Web Service for getting lists such as Allow List, Block and Reverse List. It contains other information which we didn't find out yet their meanings. You must first get the memberships before getting the address book (which contains the Forward List). See Request Membership lists for detail how to get membership.
Retrieve address book
After getting memberships, the client retrieve the address book. This correspond to the Forward List, and contact all information about Alice and his contacts on his Forward List. It contains also the groups information. See Getting Address Book for details.
Update Privacy Settings
Prior to sending ADL to the server, you must update your Privacy Settings using BLP.
Dump contact list
After the client retrieved the memberships and address book and has sent its Privacy Settings, it confirms the contact list using the ADL command.
Updating Display Name
After sending BLP and ADL, the client must send an initial PRP command to set its Display Name.
Note: You must do the previous 3 items in order or the server will ignore your ADL.
Example of BLP, ADL and PRP
Below is how you should send BLP, ADL then MFN.
< BLP 7 BL\r\n
< ADL 8 60\r\n <ml l="1"><d n="abcd.com"><c n="abc" l="3" t="1" /></d></ml>
< PRP 9 MFN DisplayName
> BLP 7 BL\r\n
> PRP 9 MFN DisplayName\r\n
> ADL 8 OK\r\n