This article applies to:
![TappIn by GlobalSCAPE]()
API v1.4
Usage Guide for TappIn Partners
October 2011
LEGAL NOTICE: This TappIn API Usage Guide ("API Guide") is for the exclusive use of participants in the TappIn Partner Program. If you are not a TappIn Partner, you may not view or otherwise use the contents of this API Guide.
The information contained in this API Guide (the “Contents”) is the proprietary and confidential information of TappIn and mayonly be used by TappIn Partner Program participants (each a “Partner”) who have executed a separate written TappIn Partner ProgramAgreement with TappIn (“Partner Agreement”). If you are not a Partner, you may not view or use this API Guide.
Each Partner acknowledges the following with respect to its use of this API Guide:
- The Contents are the confidential and proprietary information of TappIn;
- Partner’s use of the Contents is subject to the confidentiality and intellectual property ownership provisions of the Partner Agreement, as well as any additional terms and conditions contained in this API Guide;
- In the event that Partner utilizes the instructions contained in this API Guide to implement a connection with the TappIn Service, Partner will ensure that such use will at all times remain in conformance with the TappIn Service Terms of Use and Privacy Policy (copies of which may be accessed on the TappIn.com website);
- TappIn provides this API Guide “as is” and Partner’s use of the Contents is without warranty of any kind;
- This API Guide is subject to change, without prior notice to Partner;
- The form and nature of the TappIn Service is subject to change, without prior notice to Partner; and
- Except as expressly specified herein, nothing contained in this API Guide shall be construed as conferring to Partner any license to any of TappIn’s intellectual property rights.
Terms of Use
Contents
Introduction
TappIn High-Level Architecture
TappIn API
TappIn Testing and Deployment
Contact Information
TappIn Networks is a unique service that allows users access to all of their home content, without artificial limits. This access is provided on a multitude of client platforms (Web browser on Mac/PC/Netbook, iPhone, iPod Touch, iPad, Android Phone, Windows Phone 7) and all popular home computer operating systems (Mac OS X; Windows XP, Vista, 7; Linux).
The TappIn Agent in the home is intelligent about sending the most appropriate content for the end device. For example, a web browser on a computer can display higher resolution images than a phone and the image is sized appropriately before leaving the home.
This unique connectivity into the home can be built upon by third-party developers. This can be done in web applications that showcase some of the user’s home content, for example, or in native clients that run on standard or novel platforms. Thepossibilities are endless!
The TappIn API consists of a WebDAV core augmented with proprietary TappIn Service Interfaces. All interfaces are (RESTful) HTTP interfaces. This document describes them in detail.
The TappIn system consists of three major software pieces:
- The TappIn Agents: The TappIn Agent in the home is responsible for transferring data between the home and the TappIn Cloud servers.
- The TappIn Cloud Servers: The TappIn Cloud Servers transfer data between the TappIn agents and the TappIn clients. These are the servers that provide the rich TappIn API capabilities.
- The TappIn Clients: The TappIn Clients expose the rich content in the home to the end user. They can be TappIn-provided applications, such as the TappIn web application, the mobiles applications for iPhone, iPod Touch, iPad, Android Phones and Windows Phone 7 phones. They can also be third-party partner clients that use the TappIn API.
This architecture makes it easy for third-party applications to get data to and from the home without having to worry about how to get at it. All the applications have to do is perform API calls to the TappIn Cloud Servers, just like they would against other services that are purely cloud-based.
Different TappIn Cloud Servers handle different capabilities, and therefore their URLs are different.
Back to Contents
![TappIn Secure Communications]()
To get the list of the user’s TappIn folders (shares) that are currently online, perform an HTTPS GET to the TappIn Configuration Service:
https://dav.tappin.com/HomePipe/Configuration/WebDavShares(Note: folder enumeration is done by dav.tappin.com)
The authentication mechanism is Basic Auth within TLS. The username is the email address of the subscriber (e.g. user@tappin.com) and the associated password.
The response is XML that lists the shares that the user has online at the current time:
<UserShares xmlns="http://schemas.datacontract.org/2004/07/HomePipe.ConfigurationService"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AgentInstalled>true</AgentInstalled>
<Shares>
<UserShare>
<Name>FriendShare</Name>
<Owner>false</Owner>
<ReadWrite>false</ReadWrite>
<Url>https://dav02.tappin.com/friend@tappin.com/FriendShare/</Url>
</UserShare>
<UserShare>
<Name>ShareName1</Name>
<Owner>true</Owner>
<ReadWrite>true</ReadWrite>
<Url>https://dav03.tappin.com/friend@tappin.com/FriendShare/</Url>
</UserShare>
<UserShare>
<Name>ShareName2</Name>
<Owner>true</Owner>
<ReadWrite>false</ReadWrite>
<Url>https://dav01.tappin.com/user@tappin.com/ShareName2/</Url>
</UserShare>
</Shares>
</UserShares>
For each share (TappIn folder), the following information is provided:
- Name: The name of the share
- Owner: Whether the user requesting the enumeration is the owner of the share, or whether it’s been shared by a friend.
- ReadWrite: Whether the share is a read/write share (true) or a read-only share (false).
- Url: The HTTPS URL to use to access the share.
Back to Contents
Once the list of shares is obtained (see above), standard WebDAV methods (e.g. PROPFIND, GET, PUT etc.) can be used against the shares.
The authentication mechanism is again Basic Auth within TLS, using the end user’s credentials. The base URL for the WebDAV share is obtained from the User Share Listing call and is of the form:
https://webdav.tappin.com/user@tappin.com/ShareName2/(Note: WebDAV browsing is done by webdav.tappin.com)
This share maps to a directory on the user’s computer (e.g. C:\Users\Joe\Documents). Therefore, to access the file C:\Users\Joe\Documents\Sales\Winter.xls, a GET:
GET https://webdav.tappin.com/user@tappin.com/ShareName2/Sales/Winter.xls
returns the content of the file. To obtain the directory listing of the Sales folder, a PROPFIND:
PROPFIND https://webdav.tappin.com/user@tappin.com/ShareName2/Sales
returns the directory listing in standard DAV XML.
Back to Contents
Below are illustrative examples of invoking commonly used WebDAV methods. Any standard HTTPS client can be used to make these requests:
PROPFIND /user@tappin.com/DILATINO/folder/HTTP/1.1Content-Type:text/xml;charset="utf-8"Depth: 1Content-Length: 98Host:webdav.tappin.comAuthorization:Basic cHJldmlld0Bob21lcGlwZS5uZXQ6dGVzdHBhc3N3b3Jk
<?xml version="1.0" encoding="utf-8"?><DAV:propfind xmlns:DAV="DAV:"><DAV:allprop/></DAV:propfind>
HTTP/1.1 207 Multi-StatusContent-Length: 2920Content-Type:text/xml
<?xml version="1.0" encoding="utf-8"?><D:multistatus xmlns:D="DAV:"><D:response><D:href>http://webdav.tappin.com/preview@tappin.com/DILATINO/folder/</D:href><D:propstat><D:status>HTTP/1.1 200 OK</D:status><D:prop><D:getcontentlength>0</D:getcontentlength><D:getlastmodified>Fri, 29 Oct 2010 18:36:21 GMT</D:getlastmodified><D:creationdate>2010-10-29T18:06:07Z</D:creationdate><D:ishidden>0</D:ishidden><D:resourcetype><D:collection /></D:resourcetype><D:displayname>folder</D:displayname><D:supportedlock /><D:iscollection>1</D:iscollection><D:getcontenttype>httpd/unix-directory</D:getcontenttype></D:prop></D:propstat></D:response><D:response><D:href>http://webdav.tappin.com/preview@tappin.com/DILATINO/folder/newfolder/</D:href><D:propstat><D:status>HTTP/1.1200 OK</D:status><D:prop><D:getcontentlength>0</D:getcontentlength><D:getlastmodified>Fri, 29 Oct 2010 18:31:41 GMT</D:getlastmodified><D:creationdate>2010-10-29T18:31:41Z</D:creationdate><D:ishidden>0</D:ishidden><D:resourcetype><D:collection /></D:resourcetype><D:displayname>newfolder</D:displayname><D:supportedlock /><D:iscollection>1</D:iscollection><D:getcontenttype>httpd/unix-directory</D:getcontenttype></D:prop></D:propstat></D:response><D:response><D:href>http://webdav.tappin.com/preview@tappin.com/DILATINO/folder/subfolder/</D:href><D:propstat><D:status>HTTP/1.1 200 OK</D:status><D:prop><D:getcontentlength>0</D:getcontentlength><D:getlastmodified>Fri, 29 Oct 2010 18:34:46 GMT</D:getlastmodified><D:creationdate>2010-10-29T18:34:46Z</D:creationdate><D:ishidden>0</D:ishidden><D:resourcetype><D:collection /></D:resourcetype><D:displayname>subfolder</D:displayname><D:supportedlock /><D:iscollection>1</D:iscollection><D:getcontenttype>httpd/unix-directory</D:getcontenttype></D:prop></D:propstat></D:response><D:response><D:href>http://webdav.tappin.com/preview@tappin.com/DILATINO/folder/report.doc</D:href><D:propstat><D:status>HTTP/1.1 200 OK</D:status><D:prop><D:getcontentlength>21617</D:getcontentlength><D:getlastmodified>Fri, 29 Oct 2010 18:35:44 GMT</D:getlastmodified><D:creationdate>2010-10-29T18:35:44Z</D:creationdate><D:resourcetype /><D:displayname>report.doc</D:displayname><D:supportedlock /><D:ishidden>0</D:ishidden><D:iscollection>0</D:iscollection><D:getcontenttype>application/octet-stream</D:getcontenttype></D:prop></D:propstat></D:response><D:response><D:href>http://webdav.tappin.com/preview@tappin.com/DILATINO/folder/sales.xls</D:href><D:propstat><D:status>HTTP/1.1 200 OK</D:status><D:prop><D:getcontentlength>12874</D:getcontentlength><D:getlastmodified>Fri, 29 Oct 2010 18:36:22 GMT</D:getlastmodified><D:creationdate>2010-10-29T18:36:21Z</D:creationdate><D:resourcetype /><D:displayname>sales.xls</D:displayname><D:supportedlock /><D:ishidden>0</D:ishidden><D:iscollection>0</D:iscollection><D:getcontenttype>application/octet-stream</D:getcontenttype></D:prop></D:propstat></D:response></D:multistatus>
Back to Contents
PUT /user@tappin.com/DILATINO/folder/test.txt HTTP/1.1Content-Length: 16Host: webdav.tappin.comAuthorization: Basic cHJldmlld0Bob21lcGlwZS5uZXQ6dGVzdHBhc3N3b3JkThis is a test.HTTP/1.1 200 OK
GET /user@tappin.com/DILATINO/folder/test.txt HTTP/1.1Host: webdav.tappin.comAuthorization: Basic cHJldmlld0Bob21lcGlwZS5uZXQ6dGVzdHBhc3N3b3JkHTTP/1.1 200 OKContent-Length: 16This is a test.
DELETE /user@tappin.com/DILATINO/filename.txt HTTP/1.1Host: webdav.tappin.comAuthorization: Basic cHJldmlld0Bob21lcGlwZS5uZXQ6dGVzdHBhc3N3b3JkHTTP/1.1 200 OK
MKCOL /user@tappin.com/DILATINO/folder/newfolder HTTP/1.1Host: webdav.tappin.comAuthorization: Basic cHJldmlld0Bob21lcGlwZS5uZXQ6dGVzdHBhc3N3b3JkHTTP/1.1 200 OK
MOVE /user@tappin.com/DILATINO/folder/newfolder/&ens;HTTP/1.1Destination:&ens;http://webdav.tappin.com/preview@tappin.com/DILATINO/folder/anothernameHost: webdav.tappin.comAuthorization: Basic cHJldmlld0Bob21lcGlwZS5uZXQ6dGVzdHBhc3N3b3JkHTTP/1.1 200 OK
Back to Contents
A standard GET for a file simply returns the entire contents of the file, as expected in WebDAV. There are a number of TappIn extensions that allows for variants of the file contents to be served up instead.
If the file is an image file (e.g. jpg, png), a thumbnail of that image is generated and returned. The size of the thumbnail is specified; e.g. 64x64. For thumbnails of size 128x128 or smaller, a low resolution thumbnail is returned. For large “thumbnails”, a resized version of the original (still much smaller in KiloByte size) is returned, which provides for much higher fidelity but is somewhat slower.
To preserve the aspect ratio (AR) of an image intact, use the keepAR flag. For example, for a 2000x1500 high-resolution photo, asking for a 400x400 thumbnail with keepAR true returns a 400x300 scaled-down version of the original.
For the purpose of instructing a browser to download a file instead of attempting to display it, use the download decoration. This sets the Content-Disposition header appropriately for download.
This decoration applies only to GETs of directories. A normal GET would be invalid, however, with this query string, a Media-RSS description of the pictures in the directory is returned. This XML description contains links to both thumbnail and medium-resolution versions of the pictures in the directory.
Back to Contents
This API is used by partners of TappIn who are referring users to TappIn. These users can be registered as new TappIn users with this API call. The users will have to click on a link sent to their email address, to activate their TappIn account.
The registration API is a POST to the TLS URL:
https://app.tappin.com/HomePipe/SignUp/SignUp(Note: user registration is done by app.tappin.com)
The request is XML of the form:
<?xml version="1.0" encoding="utf-8"?>
<SignUpInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FirstName>Test First Name</FirstName>
<LastName>Test Last Name</LastName>
<Email>Test Email</Email>
<Password>Test Password</Password>
</SignUpInformation>
The response is the status of the registration. It is XML of the form:
<?xml version="1.0" encoding="utf-8"?>
<SignUpStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ErrorCode>0</ErrorCode>
<ErrorString>RegistrationSuccessful</ErrorString>
</SignUpStatus>
The possible status codes are:
// The registration was successful.RegistrationSuccessful = 0,
// The registration failed for some unknown reason.// This is abnormal and indicates a server error.// Handle as gracefully as possible on the client.RegistrationFailed = 1,
// The user (as defined by the email address) already exists.// Tell the user to simply log in with their original credentials.UserAlreadyExists = 2,
// The user (as defined by the email address) does not exist yet.// It's safe to use this email address for// completing the sign up process.UserDoesNotExistYet = 3,
// The email address provided by the user is invalid.// Reprompt the user for a new email address.InvalidEmailAddress = 4
You will need to be in the TappIn partnership program to be able to use this API. Please contact TappIn for the credentials to use to authenticate this request.
Back to Contents
This API call is also used by partners of TappIn. The purpose of this call is to let the client validate user input on the fly, before a formal registration request is made. It simply checks whether the email address sent is already known. The URL is:
https://app.tappin.com/HomePipe/SignUp/UserExists(Note: user check is done by app.tappin.com)
The format of the XML request and th XML response are the same as for the registration API.
You will need to be in the TappIn partnership program to be able to use this API. Please contact TappIn for the credentials to use to authenticate this request.
This API call lets the client obtain information about the user’s subscription, such as the number of uses left for the month. The URL is:
https://dav.tappin.com/HomePipe/Subscription/GetSubscriptionInfo?userAgent={userAgent}where {userAgent} is the (URL-encoded) user agent string for the client (used for tracking purposes). This URL is protected by Basic Auth, as usual, with the user’s credentials.
The response is of the form:
<?xml version="1.0" encoding="utf-8"?>
<SubscriptionInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ShouldUpgrade>false</ShouldUpgrade>
<UpgradeURL>http://www.tappin.com</UpgradeURL>
<IsPayingSubscriber>false</IsPayingSubscriber>
<SubscriptionExpiryDate>2011-02-04T01:02:14.2312498Z</SubscriptionExpiryDate>
<DaysRemaining>30</DaysRemaining>
<UsageStatistics>
<TotalFreeUsesPerMonth>10</TotalFreeUsesPerMonth>
<CurrentMonthUseCount>2</CurrentMonthUseCount></UsageStatistics>
<HasPremiumApp>true</HasPremiumApp>
</SubscriptionInfo>
The “ShouldUpgrade” and “UpdateURL” are used by TappIn clients to determine whether an upgrade is necessary. It should be ignored by partners.
The “IsPayingSubscriber” boolean field indicates whether the user is a paying subscriber of TappIn.
The “SubscriptionExpiryDate” indicates when the paid subscription ends.
The “DaysRemaining” is the number of full days till the subscription expires.
The “TotalFreeUsesPerMonth” is the maximum number of free uses a user is allowed per month. The “CurrentMonthUseCount” is the number of free uses the user has already used up this current month. Thus, the number of free uses the user has left for the month is:
Number_Of_Uses_Left_In_Current_Month=TotalFreeUsesPerMonth&#emps;CurrentMonthUseCount
TappIn defines a “use” of the service as follows:
A "Use" of the TappIn Service is started when a TappIn user accesses (views/downloads) his or her files. A period of inactivity of two or more hours ends the "Use" of TappIn. Any future file access counts as the next "Use."
The “HasPremiumApp” boolean field signals whether the user has ever purchased a paid version of a TappIn app.
TappIn still lets users access their friends’ shared content even when their free usage has expired. They just cannot access their own content.
Back to Contents
This set of API calls is for playful and social interaction with users.
This API call returns 3 picture URLs in order of most recent: first from friends, then from user if there weren’t 3 found, then from the default set if the previous two searches don’t add up to 3.
Perform an HTTPS GET to:
https://app.tappin.com/HomePipe/RecentPicturesThe authentication mechanism is Basic Auth within TLS. The username is the email address of the subscriber (e.g. user@tappin.com) and the associated password.
The response is XML of this form:
<?xml version="1.0" encoding="utf-8"?>
<RecentPictures xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Picture>
<Name>Chrysanthemum</Name>
<Url>https://dav03.tappin.com/kevin.beddingfield@gmail.com/Pictures/Chrysanthemum.jpg</Url>
</Picture>
<Picture>
<Name>Desert</Name>
<Url>https://dav03.tappin.com/kevin.beddingfield@gmail.com/
Pictures/Desert.jpg</Url>
</Picture>
<Picture>
<Name>Hydrangeas</Name>
<Url>https://dav03.tappin.com/kevin.beddingfield@gmail.com/
Pictures/Hydrangeas.jpg</Url>
</Picture>
</RecentPictures>
This API call returns 3 picture URLs in order of most recent: first from user, then from the default set if the user didn’t have 3.
Perform an HTTPS GET to:
https://app.tappin.com/HomePipe/MyRecentPicturesThe authentication mechanism is Basic Auth within TLS. The username is the email address of the subscriber (e.g. user@tappin.com ) and the associated password.
The response is XML of the same form as the Recent Pictures API call.
This API call returns 3 picture URLs in order of most recent: first from friends, then from the default set if the friends didn’t have 3. Perform an HTTPS GET to:
https://app.tappin.com/HomePipe/FriendsRecentPicturesThe authentication mechanism is Basic Auth within TLS. The username is the email address of the subscriber (e.g. user@tappin.com) and the associated password.
The response is XML of the same form as the Recent Pictures API call.
Back to Contents
This API call lets the client initiate sharing of a user’s file or folder via a public or private link as well as send sharing notification. Private sharing requires a list of emails (TappIn usernames) that will have rights to access the share. Email notifications will be sent automatically in this case. For public sharing a link should be shared via other means (e.g. by the user composing an email themselves, or by SMS etc). Share Read-Only or Read-Write access will be the same as defined for the share and is not changed by the sharing API.
A POST to the following URL initiates sharing:
https://app.tappin.com/HomePipe/Sharing/Share/This URL is protected by Basic Auth, as usual, with the user’s credentials.
The request is of the form:
<?xml version="1.0" encoding="utf-8"?>
<sharing_information xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-
instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<sharename>$sharename</sharename>
<path>$path</path>
<needlogin>$needlogin</needlogin>
<people>$people</people>
<message>$message</message>
<body>$body</body>
<from$from</from>
<type>$type</type>
<intent>$intent</intent>
<needshort>$needshort&lr;/needshort>
</sharing_information>
The parameters are as following:
“$sharename” is a name for share.
“$path” is the share’s mount point: this is a relative path, relative to the path that was defined when the user created the “$sharename” share.
“$needlogin” is yes for private and no for public sharing.
“$people” is comma (“,”) separated list of email addresses. These emails need not all be TappIn users: if they are not, they will be invited to become users before they are allowed to view the shared content.
“$message” is a subject of notification email.
“$body” is a body of notification email.
“$from” is a user email (username of the account).
“$type” is a ‘file’ for single file sharing or ‘folder’ for a folder sharing.
“$intent” is an intent of sharing that can be one of the following: “undefined”, “sms”, (“homepipe” (this is used for sharing on TappIn web site), “facebook”, “email”, “link” (generic link sharing).
“$needshort” is a ‘yes’ or ‘no’ for getting a short (using TappIn URL-shortening service) or default long sharing link.
Example:
<?xml version="1.0" encoding="utf-8"?>sharing_informationxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"><sharename>C</sharename> <path>Music/</path><needlogin>no</needlogin> <people>noemails</people><message></message> <body></body><from>tester@homepipe.net</from> <type>folder</type><intent>email</intent><needshort>no</needshort></sharing_information>
The response is of the form (example):
<?xml version="1.0" encoding="utf-8"?><SignUpStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ErrorCode>0</ErrorCode><ErrorString>OK</ErrorString><SharedLink>https://app.tappin.com/access/0aaaaaa0-aaaa-1111-bbbb-111111111111</SharedLink><ShortLink>tppn.in/12345678</ShortLink><DavPrefix>https://dav05.tappin.com/tester@homepipe.net/</DavPrefix></SignUpStatus>
The “ErrorCode” indicates the error code (0 is no error)
The “ErrorString” describes an error.
The “SharedLink” is a resulting shared link.
The “DavPrefix” is information about the server that can be used for accessing tumbnails if needed.
If private sharing was used TappIn server will send notifications to all parties in the people list (if not empty).
Back to Contents
In most cases, you will use stable versions of the TappIn API currently running on production servers. However, in some instances, close partners may take a dependency on a pre-release API. This section explains the TappIn testing and production deployment process.
TappIn uses a staged approach to testing and rolling out to production. The first step after internal development is to host beta-quality code on the TappIn Staging servers, with their own dedicated user account database:
- TappIn Web Staging Server: https://www-staging.tappin.com. Use this everywhere instead of https://app.tappin.com.
- TappIn Dav Server: https://dav-staging.tappin.com. Use this everywhere instead of https://dav.tappin.com and https://webdav.tappin.com.
If you need access to the staging servers, please contact TappIn.
Please contact us at: support@tappin.com for admission into the TappIn API program and other inquiries and questions.
Thanks for using the TappIn APIs!
Back to Contents