Getting Signature Key
|
|
The first step in using our contact grabber WebService is getting the signature key, signature
key(transaction id) is found once you make purchase and redirected to our website
and also found on the email which you receive from StesCodes after you make purchase.
The transaction id of StesCodes is refered to as signature key.
Inorder to use the trial, you need to generate the key here
http://stescodes.com/trial.aspx. You shall get the key based on the selection
of plan.
|
|
back to top
|
Contact Grabber
|
|
The next step after getting the signature key, is creating reference.
|
Reference
|
| Note: |
You shall download the stescodes_eval.dll for .net 2008 here Download
You shall download the stescodes_eval.dll for .net 2010 here Download
|
|
|
back to top
|
Settings
|
|
Add the below appsettings on your web.config file
<add key="gmailapikey" value="Your gmail consumer or api key"/>
<add key="gmailapisecret" value="Your gmail consumer or api secret key"/>
<add key="consumerKey_yahoo" value="Your yahoo consumer or api key"/>
<add key="consumerSecret_yahoo" value="Your yahoo consumer or api secret key"/>
<add key="liveapiKey" value="Your live consumer or api key"/>
<add key="livesecretKey" value="Your live consumer or api secret key"/>
|
|
back to top
|
Direct method
|
|
Function
|
|
GrabContacts(servicename, strUserName, strPassword, signaturekey);
|
|
Parameters for Direct method
|
|
Parameters
|
Description
|
Required?
|
|
1. ServiceName
|
Service Name refers to the mail servers. Inorder to access a service use the below
reference keywords
aol, lycos, orkut, icq, googlewave,
evite, kodak, hushmail, mail.com, aim, plaxo, bigstring, opera, mail2world, fastmail,
indiamail, in.com, indiatimes, indiainfo, eolii, rediff, web.de, freenet, tonline,
rambler, mail.ru, mynet, inbox, gmx
Note: For gmail, yahoo, msn, hotmail and msnmessenger, we recommend to use the OAuth Method
|
Yes
|
|
2. Signature
|
Formated Signature:
In order to format the signature key, make reference of "processor" class and then
pass your signature key along with the HttpContext object associated with the page
as input parameter to "getSecretKey", which is a function of "processor" class.
The signature must be formatted before making a request.
|
Yes
|
|
3. username
|
Login email of the particular email server. For outlook or csv grabbing requests
pass the http url of the csv file.
|
Yes/No
|
|
4. Password
|
Login password of the particular email server. For outlook or csv grabbing requests
pass "outlookcsv" as password.
|
Yes
|
|
|
Return Type
|
The return type is collection.
- Email
- Name
|
|
|
OAuth method
|
|
To start grabbing contacts using OAuth Method, you have to make request to three functions
- GetAuthenticationUrl
- GetAccessToken
- GrabContacts_OAuth
To configure API keys in Gmail, Yahoo and Windows Live, click here
How to configure API keys.
|
|
Function for GetAuthenticationUrl function
|
|
GetAuthenticationUrl(servicename, ConsumerKey, ConsumerSecret, callbackurl, policyurl);
|
|
Parameters
|
|
Parameters
|
Description
|
Required?
|
|
1. ServiceName
|
Service Name refers to the mail servers. Inorder to access a service use the below
reference keywords
gmail, yahoo, msn, hotmail and msnmessenger.
|
Yes
|
|
2. ConsumerKey
|
Consumer key(API Key) which you received after registering you application on gmail, yahoo, msn, hotmail and msnmessenger
|
Yes
|
|
3.ConsumerSecret
|
Consumer Secret(APi Secret) which you received after registering you application on gmail, yahoo, msn, hotmail and msnmessenger
|
Yes
|
|
4. callbackurl
|
CallbackURL is the return url which is used, once the user is redirected to authorize, he/she will be redirected to the callbackurl
(note: sometimes you might get error with callbackurl between www.xx.com and xx.com, so carefull with www)
|
Yes
|
|
5. policyurl
|
URL of your policy page.
|
Yes/No
|
|
|
Return type
|
The return type is collection.
- Token
- TokenSecret
- UID
- AuthURL
|
|
|
|
Function for GetAccessToken function
|
|
GetAccessToken(servicename, ConsumerKey, ConsumerSecret, callbackurl, token, tokensecret, tokenverifier);
|
|
Parameters
|
|
Parameters
|
Description
|
Required?
|
|
1. ServiceName
|
Service Name refers to the mail servers. Inorder to access a service use the below
reference keywords
gmail, yahoo, msn, hotmail and msnmessenger.
|
Yes
|
|
2. ConsumerKey
|
Consumer key(API Key) which you received after registering you application on gmail, yahoo, msn, hotmail and msnmessenger
|
Yes
|
|
3.ConsumerSecret
|
Consumer Secret(APi Secret) which you received after registering you application on gmail, yahoo, msn, hotmail and msnmessenger
|
Yes
|
|
4. callbackurl
|
CallbackURL is the return url which is used, once the user is redirected to authorize, he/she will be redirected to the callbackurl
(note: sometimes you might get error with callbackurl between www.xx.com and xx.com, so carefull with www)
|
Yes
|
|
5. Token
|
Token which you received through callback url after user redirection from authorization page.
|
Yes
|
|
6. TokenSecret
|
TokenSecret which you receive from "GetAuthenticationUrl" as return parameters.
(note:for hotmail, msn and msnmessenger pass this parameter as empty string)
|
Yes/No
|
|
7. TokenVerifier
|
TokenVerifier which you received through callback url after user redirection from authorization page.
(note:for gmail, hotmail, msn and msnmessenger pass this parameter as empty string)
|
Yes/No
|
|
|
Return type
|
The return type is collection.
- Token
- TokenSecret
- UID
- AuthURL
|
|
|
|
Function for GrabContacts_OAuth function
|
|
GrabContacts_OAuth(servicename, token, tokensecret, tokenverifier, UID, signaturekey, ConsumerKey, ConsumerSecret);
|
|
Parameters
|
|
Parameters
|
Description
|
Required?
|
|
1. ServiceName
|
Service Name refers to the mail servers. Inorder to access a service use the below
reference keywords
gmail, yahoo, msn, hotmail and msnmessenger.
|
Yes
|
|
2. Token
|
Token which you received from "GetAccessToken" as return parameter.
|
Yes
|
|
3. TokenSecret
|
TokenSecret which you receive from "GetAccessToken" as return parameters.
|
Yes/No
|
|
4. TokenVerifier
|
TokenVerifier which you receive from "GetAccessToken" as return parameters.
|
Yes/No
|
|
5. UID
|
User id which you receive from "GetAccessToken" as return parameters.
|
Yes/No
|
|
6. Signature
|
Formated Signature:
In order to format the signature key, make reference of "processor" class and then
pass your signature key along with the HttpContext object associated with the page
as input parameter to "getSecretKey", which is a function of "processor" class.
The signature must be formatted before making a request.
|
Yes
|
|
7. ConsumerKey
|
Consumer key(API Key) which you received after registering you application on gmail, yahoo, msn, hotmail and msnmessenger
|
Yes
|
|
8.ConsumerSecret
|
Consumer Secret(APi Secret) which you received after registering you application on gmail, yahoo, msn, hotmail and msnmessenger
|
Yes
|
|
|
Return Types
|
The return type is collection.
- Email
- Name
|
|
|
Debugging
|
|
Debugging Gmail:
- Create API key with the localhost url as return url(when going live, change the return url to live url)
- Replace the api key and secret key in web.config file
- Replace the already provided localhost url in oauth.aspx.cs file
- Then try with breakpoints to debug
|
|
Debugging Yahoo:
- Create API key with the localhost url as return url(when going live, change the return url to live url)
- Replace the api key and secret key in web.config file
- Then try with breakpoints to debug
|
|
Debugging Windows Live:
Debugging for Hotmail, MSN and msnmessenger is hard when compared to other services because in OAuth method, for the
three services, you receive the token in post data other than in querystring. So follow the below steps to debug in local
- Upload the auth.aspx page to your server.
- Do the below five steps when the user is redirected after authentication.
- Get the post data and construct as a url with querystring parameter(for ex: token=xxx&tokensecret=yyyy as
http://youdomain.com/auth.aspx?token=xxx&tokensecret=yyyy)
- After constructing the parameter change the constructed url to localhost url(for ex: http://youdomain.com/auth.aspx?token=xxx&tokensecret=yyyy to
http://localhost:2345/yourproject/auth.aspx?token=xxx&tokensecret=yyyy
- Redirect to the localhost url(for ex: Response.Redirect(http://localhost:2345/yourproject/auth.aspx?token=xxx&tokensecret=yyyy);)
- Now you will get the token in localhost for debugging.
- Remove the redirection part after you done with your debugging.
|
|
back to top
|
Binding
|
|
Once the contacts are grabbed and received as collection, you shall loop through to access
the contacts. Binding the data to front end is all customizable.
|
|
back to top
|
Error Handling
|
|
There are few error messages you need to taken care on your end
|
Error Message
|
|
Error
|
Description
|
|
1. Invalid domain
|
The license(Signature Key) is not registered for this domain. You shall change/edit
your domain here http://stescodes.com/sourceupdate.aspx
|
|
2. Invalid key
|
The Signature Key is invalid.
|
|
3. Invalid username & password
|
The username or password is invalid.
|
|
4. Please try again
|
Please try again one more time.
|
|
5. Please login to http://www.gmail.com and then try again
|
If the user account is not used for long time Gmail will ask for CAPTCHA authentication,
so user have to login to his account and then try importing.
|
|
6. Missing input
|
Missing the input parameter
|
|
7. This service not available on your plan
|
The service you are requesting to grab contacts are not available on your purchased
plan.
|
|
|
back to top
|
Change Domain
|
|
If you get the domain is invalid and you purchased license for that domain, then
you shall follow the below steps to update your domain.
|
Edit/Change Domain
|
To edit or change your domain
- Login to http://stescodes.com/sourceupdate.aspx
- You shall login using email and password which you received in email during purchase
or you shall use the StesCodes transaction id
- Once you login, click the edit link near website
- Enter the domain details
- Click "proceed" to save.
|
|
back to top
|