# Table of contents:
# Introduction
ABContactAdd is one of the SOAP actions the Address Book Service provides.
Adds one or more user(s) as contact(s) to an Address Book.
In Official Client terms, this will add contacts to your Forward List (FL).
For adding a user to any other list, read the AddMember article.
# Client/Request
The template used in this action is described on the Address Book Service main page.
# ABContactAddThis element has only one attribute:
xmlns: This is always set tohttp://www.msn.com/webservices/AddressBook.
This element contains the Address Book GUID to use.
# contactsThis element contains one or more <Contact> elements.
This element has only one attribute:
xmlns: This is always set tohttp://www.msn.com/webservices/AddressBook.
For more information about this element, read the <contactInfo> article.
The relevant elements are:
<passportName>: The user handle that you would like to add.<isMessengerUser>: Is the user I am adding a part of the Messenger Service Network? If they are, set totrue, otherwise set tofalse.<contactType>: (Optional?) The type of contact you'd like to add:LivePending: A Messenger Service user.Regular: A user from another service.
<emails>: Used exclusively if this is a e-mail address only contact.<isSmtp>: Used with<phones>if this is a phone-only contact.<phones>: Used with<isSmtp>if this is a phone-only contact.
This element contains one child:
<EnableAllowListManagement>: Usually only set totrue.
# Server/Response
The template used in this action is described on the Address Book Service main page.
# ABContactAddResponseThis element has only one attribute:
xmlns: This is always set tohttp://www.msn.com/webservices/AddressBook.
This element only contains the <ABContactAddResult> element.
This element only contains the <guid> element.
They may be the same amount of <guid> elements as the amount of <Contact> elements you specify,
but this behavour is yet to be confirmed.
The GUID of the contact you have added.
# Examples
# Client/Request
POST /abservice/abservice.asmx HTTP/1.1
SOAPAction: http://www.msn.com/webservices/AddressBook/ABContactAdd
Cache-Control: no-cache
Content-Type: text/xml; charset=utf-8
Content-Length: 1322
<?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>996CDE1E-AA53-4477-B943-2BE802EA6166</ApplicationID>
<IsMigration>false</IsMigration>
<PartnerScenario>ContactSave</PartnerScenario>
</ABApplicationHeader>
<ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
<ManagedGroupRequest>false</ManagedGroupRequest>
<TicketToken>t=ticket&p=profile</TicketToken>
</ABAuthHeader>
</soap:Header>
<soap:Body>
<ABContactAdd xmlns="http://www.msn.com/webservices/AddressBook">
<abId>00000000-0000-0000-0000-000000000000</abId>
<contacts>
<Contact xmlns="http://www.msn.com/webservices/AddressBook">
<contactInfo>
<passportName>anotheruser@hotmail.com</passportName>
<isMessengerUser>true</isMessengerUser>
<contactType>LivePending</contactType>
</contactInfo>
</Contact>
</contacts>
<options>
<EnableAllowListManagement>true</EnableAllowListManagement>
</options>
</ABContactAdd>
</soap:Body>
</soap:Envelope>
# Server/Response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 849
<?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">
<Version>12.01.1111.0000</Version>
<CacheKey>12r1;MjAyNC0xMS0xOVQxNDowOTowNi41MzZa</CacheKey>
<CacheKeyChanged>true</CacheKeyChanged>
<PreferredHostName>contacts.example.com</PreferredHostName>
<SessionId>ecfaf8c7-e388-4571-8641-b061a0ac4bdc</SessionId>
</ServiceHeader>
</soap:Header>
<soap:Body>
<ABContactAddResponse xmlns="http://www.msn.com/webservices/AddressBook">
<ABContactAddResult>
<guid>c1f9a363-4ee9-4a33-a434-b056a4c55b98</guid>
</ABContactAddResult>
</ABContactAddResponse>
</soap:Body>
</soap:Envelope>