Doc of Contact Grabber-API V5.0
The StesCodes Contact Grabber provides the ability to import contacts from various mail servers and social networks in minutes. Contact Grabber does not includes email server access to send invitation. The below is the technical document to configure the grabber.
Contact Grabber Documentation
 
OAuth method
Contact Grabber
  1. Add reference to the script file "StesCodes.js" file on your project, which helps to create formatted signature key
  2. Configure APP for Gmail, Yahoo and Windows Live to get API keys
  3. If you don't have signature key then use the trial signature key
    • You can get the trial signature from here
  4. Include the below in your project if you have analytics enabled.
                        
    <!-- analytics code starts here -->
    <div id="stescodes-root"></div>
     < script  id="stesanalytics" type="text/javascript" src='http://stescodes.com/js/stescodesanalytics.js?id=your license key&pdt=contactgrabber"></ script >
    <!-- analytics code ends here -->
    
    < script  language="javascript" type="text/javascript">
        contactGrabber.storeAnalytics = function() {
            StesCodesAnalytics.regGrab(contactGrabber.getAllContacts(), contactGrabber.getSelectedService());
        }
    </ script >
                        
                        
Fill the api keys and license keys in the below configuration and add it to your configuration file.
                        
  <appSettings>
        <!-- API EndPoint URL-->
        <add key="APIUrl" value="https://stescodes.com/api/contactsapi.aspx"/>
    
    <!-- Your Licese key here -->
    <add key="LicenseKey" value="*********************************"/>
    
    <!-- Select All Contacts By Default -->
    <add key="DefaultSelection" value="false"/>

    <!-- To get Google Contacts api key  https://code.google.com/apis/console/  -->
    <add key="gmailapikey" value="Your gmail api key here"/>
        <add key="gmailapisecret" value="Your gmail api secret key here"/>
    
    <!-- Yahoo Contacts api key use this https://developer.apps.yahoo.com/projects -->
    <add key="consumerKey_yahoo" value="Your yahoo api key here"/>
        <add key="consumerSecret_yahoo" value="Your yahoo api secret key here"/>
    
    <!-- To get Windows Live api key use this https://manage.dev.live.com   -->
    <add key="liveapiKey" value="Your live api key"/>
        <add key="livesecretKey" value="Your live api secret key"/>
    
    <!-- Facebook https://developers.facebook.com/apps -->
    <add key="consumerKey_fb" value="Your facebook api key"/>
        <add key="consumerSecret_fb" value="Your facebook api secret key"/>

    <!-- Your smtp mail server here -->
    <add key="smtpServer" value="youe smtp mail server"/>
  </appSettings>
                        
                    
Direct Authentication
Grab contacts using direct authentication with username and password. For Gmail, Yahoo and Windows Live use OAuth authentication to grab contacts.
Request
Input Parameters
Response
OAuth Authentication
To start grabbing contacts using OAuth Method, you have to make request to three functions in order.
GetAuthenticationUrl
GetAccessToken
GrabContacts OAuth
If the StesCodes contactgrabber.js file is referenced on the project and if the contactgrabber functions are used to display the contacts then you don't have to explicitly call the analytics function to store analytics because its handled internally by the contactgrabber scrips. You can explicitly store the analytics by calling the below function

< script  language="javascript" type="text/javascript">
    contactGrabber.storeAnalytics();
</ script >
                    
If you are not using StesCodes contactgrabber scripts, then call the below function to log the analytics.

< script  language="javascript" type="text/javascript">
    StesCodesAnalytics.regGrab(<array of contacts>,<service name>);
    
    example:
    StesCodesAnalytics.regGrab([{name:"":email:""}], "gmail");
</ script >
                    
All the analytics can be view by following the below steps
  1. Login to your account here
  2. Navigate to view analytics
Format Signature
Inorder to format the signature key, the below file should be referenced on your project

                    
//Include on your page
 < script  type="text/javascript" src="js/StesCodes.js"></ script >

//Have the hidden field on your page
<input type="hidden" id="hdnLicKey" name="hdnLicKey" value=""/>

< script  language="javascript" type="text/javascript">
    //callback function for signature formatter
    var callbackFn = function(data) {
        //console.log(JSON.stringify(data));
        //your logic here
    }
    var formatSignature = function(license) {
        document.getElementById("hdnLicKey").value = license;
        //Syntax: StesCodes.init(,);
        //Example: StesCodes.init(<(required) - array of license keys>,<(optional) - callback frunction name>);
        StesCodes.init(license, "callbackFn");
    }
    var getFormattedKey = function() {
        //Syntax: StesCodes.getSignatureKey()
        //Example: StesCodes.getSignatureKey(<(optional) - license key>)
        return StesCodes.getSignatureKey(document.getElementById("hdnLicKey").value);
    }
    //Finally call
    formatSignature(['tx_6asasas7-ab45-bd97easas08ddsadas0']);
    
    //To get the formatted signature key call getFormattedKey() 
    var formattedSignatureKey = getFormattedKey();
</ script >
Error Handling
There are few error messages you need to taken care on your end
Error Description
1. Invalid domain The license(Signature Key) is not registered for this domain. You can change/edit your domain by following the steps listed in "Domain Change"
2. Invalid signature key The Signature Key is provided is invalid, please reference the receipt email from StesCodes to revalidate the entry of correct signature key. If still unable to resolve, please contact support@stescodes.com
3. Missing input Input parameters required for the call is missing. Please review the documentation for the required input parameters
4. This service is not available on your plan The service requested to grab contacts is not available on the purchased plan. Please purchase the required plan for this service and try again.
5. Signature key must be formatted, please refer Please refer here to format the signature key The signature key must be formatted using the StesCodes.js
6. This domain is not registered with StesCodes.com The license is valid for the domain which you provided on your account.
7. Invalid username & password The provided username and password is wrong.
8. Update email & mobile number on your aol account and retry Update your email and moble number by login to your AOL account.
Change Domain
If you want to change your domain or if you get the error message "invalid domain" (API response), please follow the steps below
To edit or change your domain
back to top