Share via


Stssync Protocol

Applies to: SharePoint Foundation 2010

The stssync protocol enables you to add an Events list or a Contacts list that exists on a Microsoft SharePoint Foundation site to Microsoft Outlook or to a third-party application that supports the protocol.

stssync://sts/?ver=version&type=folder-type&cmd=command-name&base-url=sts-url&guid=the-guid&site-name=site-friendly-name&list-name=list-friendly-name&list-url=list-url&user-id=uid

version

Required. The version of the application in the format x.y. For example, for Outlook, the value of this parameter should be 1.0. The values x and y must be composed of numbers only. x must not start with a zero, and y must be either zero or some other sequence of digits that does not start with a zero.

NoteNote
x and y cannot contain more than two digits each; otherwise Outlook considers the URL to be malformed. A third-party client application may use this parameter, but when the URL is constructed, the parameter must have a value—otherwise the URL is considered malformed.

folder-type

Required. Can be calendar or contacts, depending on the type of SharePoint list that is being added to Outlook or to a third-party application. This parameter is case-insensitive.

command-name

Required. The command name that Outlook or the third-party application understands. Specify add-folder to add a folder to Outlook. More commands can be added to Outlook later.

sts-url

Required. The URL to the SharePoint site that is being added. It should not end in a slash (/) character.

the-guid

Required. The GUID that, when paired with the sts-url parameter, uniquely identifies a SharePoint list. Outlook expects this parameter to be in the following format: "{"+ 8 hexadecimal characters + "-" + 4 hexadecimal characters + "-" + 4 hexadecimal characters + "-" + 12 hexadecimal characters + "}". If this parameter is in a different format, Outlook considers the URL malformed and returns an error.

site-friendly-name

Required. The display name of the site that contains the list that is being added. Outlook uses this parameter to create the folder name.

list-friendly-name

Required. The display name of the list that is being added. Outlook uses this parameter to create the folder name.

list-url

Required. A string that is added to the sts-url parameter to create the full URL for the list. It should start with a slash (/) character.

uid

Optional. A number greater than zero, with fewer than eight digits. Uniquely represents a user on the SharePoint site.

Notes

  • Special character escaping: If any of the characters "&", "\", "[", "]", or "|" is part of the value of the sts-url, site-friendly-name, list-friendly-name, or list-url parameters, the character must be preceded by a "|" (pipe) character. For example, a list-friendly-name of Dan [Wilson] - Business\Personal Contacts would become Dan |[Wilson|] - Business|\Personal Contacts.

  • The sts-url, site-friendly-name, list-friendly-name, and list-url parameters can contain Unicode characters. However, the Unicode characters must be enclosed in brackets "[ ]" and must be 4-digit hexadecimal character representations of the Unicode characters.

  • To implement a third-party client that can use the stssync protocol to add and synchronize Events and Contacts lists that exist on a SharePoint site, you typically must implement an ActiveX control named StssyncHandler and provide support for the stssync protocol. The third-party client typically must be able to decode the URL and synchronize the Contacts or Events list on the SharePoint site. You can use the Microsoft.SharePoint namespace or the web services that are exposed by SharePoint Foundation to perform this task. You must also register the stssync protocol in the registry with the name of the executable file of your application. If you are running the Windows operating system with Windows Internet Explorer 5.0 or later, you can use the following code example. Copy the code to a .reg file, and replace <Path to exe> with the path to the executable file of the application that wants to synchronize events and contacts with SharePoint Foundation. Then double-click the .reg file to register the stssync protocol on your computer.

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\stssync]
    @="URL:Add SharePoint Folder"
    "URL Protocol"=""
    
    [HKEY_CLASSES_ROOT\stssync\shell]
    @="open"
    
    [HKEY_CLASSES_ROOT\stssync\shell\open]
    @=""
    
    [HKEY_CLASSES_ROOT\stssync\shell\open\command]
    @="<Path to exe> \"%1\""
    

    For information about the StssyncHandler control that is installed on the client computer during Microsoft Office Setup, see StssyncHandler Control.

Example

stssync://sts/?ver=1.0&type=calendar&cmd=
add-folder&base-url=http%3A%2F%2Fspserver1&list-url=
%2FLists%2FEvts%2FAllItems%2Easpx&guid=
%7BAA7D945C%2DE5C3%2D4854%2DB631%2D10A98E711E2B%7D&site-
name=Share|%7CPoint%20|%5BSite|%5D&list-name=Ev[00E900F1]ts

This URL is for a list named "Evéñts" on a site named "Share|Point [Site]" with site URL http://spserver1 and list URL http://spserver1/Lists/Evts/AllItems.aspx. Note the use of the vertical bar to escape the "|", "[", and "]" characters, and the hexadecimal representation of the two Unicode characters in the list name.