Protocols/MSNP/MSNP13/Contact Updates

From NINA Wiki
Revision as of 11:02, 13 May 2022 by Animadoria (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
MSNP Protocol
Version 13
General
OverviewChanges
ChallengesSharing 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
IntroductionTermsClients
Reference
Error ListCommandsRelying Party SuiteSpotlife
Services
XMPPHTTP GatewayTabsActivities
Documentation
Development ToolsMSNP Grid
PolygamyURLs used by MSN
Documents
Protocol Versions
Version 21
Version 18
Version 16
Version 15
Version 14
Version 13
Version 12
Version 11
Version 9
Version 8
Version 2
MSNC
IntroductionP2PObject DescriptorDisplay PicturesFile Transfer
Scenarios
Microsoft Messenger for Mac
MSNP on WebTV (MSNTV)


Overview

The new protocol handles almost everything through SOAP requests, including changing your nickname or a contact's nickname, or any other details. This section handles those changes.

Changing Your/A Contact's Nickname

SOAP Request

To change your nickname, you need to use this method along with PRP, if you only use PRP, your nickname will disappear the next time you sign in. A simple SOAP request to "https://contacts.msn.com/abservice/abservice.asmx" with the action "http://www.msn.com/webservices/AddressBook/ABContactUpdate" will do it:

POST /abservice/abservice.asmx HTTP/1.1
SOAPAction: http://www.msn.com/webservices/AddressBook/ABContactUpdate
Content-Type: text/xml; charset=utf-8
Cookie: MSPAuth=*Removed*;MSPProf=*Removed*
User-Agent: MSN Explorer/9.0 (MSN 8.0; TmstmpExt)
Host: omega.contacts.msn.com
Content-Length: 1105
Connection: Keep-Alive
Cache-Control: no-cache
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soap:Header>
        <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
            <ApplicationId>CFE80F9D-180F-4399-82AB-413F33A1FA11</ApplicationId>
            <IsMigration>false</IsMigration>
            <PartnerScenario>Timer</PartnerScenario>
        </ABApplicationHeader>
        <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
            <ManagedGroupRequest>false</ManagedGroupRequest>
        </ABAuthHeader>
    </soap:Header>
    <soap:Body>
        <ABContactUpdate xmlns="http://www.msn.com/webservices/AddressBook">
            <abId>00000000-0000-0000-0000-000000000000</abId>
            <contacts>
                <Contact xmlns="http://www.msn.com/webservices/AddressBook">
                    <contactInfo>
                        <contactType>Me</contactType>
                        <displayName>*Nickname Here*</displayName>
                    </contactInfo>
                    <propertiesChanged>DisplayName</propertiesChanged>
                </Contact>
            </contacts>
        </ABContactUpdate>
    </soap:Body>
</soap:Envelope>

displayName is the field where you should place your nickname or your contact's nickname. You can also change other fields but for now, I will only handle display names. contactType is Me because you're changing your own display name. The rest has been discussed before.

SOAP Reply

Here's a snippet of the reply you should get from the server.

HTTP/1.1 200 OK
Date: Fri, 08 Sep 2006 21:17:54 GMT
Server: Microsoft-IIS/6.0
P3P:CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"
X-Powered-By: ASP.NET
X-MSNSERVER: BAYABCHWBB198
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 419
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Header>
        <ServiceHeader xmlns="http://www.msn.com/webservices/AddressBook" />
    </soap:Header>
    <soap:Body>
        <ABContactUpdateResponse xmlns="http://www.msn.com/webservices/AddressBook" />
    </soap:Body>
 </soap:Envelope>