Making your users type their friends email addresses into your refer-a-friend form is a friction point that we're in business to help you with.
The first step is to get yourself a CloudSponge account and tell us the domain name of your website. Once you've done that, we'll issue you a Domain Key and Domain Password and everything else you need to know is right here in the developer documentation.
Import contacts with the CloudSponge API follows a 3-stage asynchronous process.
Step 1: Get Permission - Your application initiates an address book import by calling the “Begin Import” URL, specifying the user authentication method, the address book source, plus any other additional information required. The API returns a result object containing a unique identifier for subsequent calls to the API and a URL that needs to be displayed in the user’s browser for consent.
Step 2: Wait For Import - Your application polls the “Events” URL and receives a result object indicating the current Import Events. These events notify you of the current progress of the import, if any errors have occurred, or when the import is complete. You can optionally display these Import Events to the user’s browser.
Step 3: Download - Once you have received a successful “complete” Import Event, you can retrieve the contacts payload from the API directly or from a database configured for your account.