|
Getting License Key
|
|
The first step in using our contact grabber API is getting the license key. The license
key(transaction id) will be available to you once the license is purchased.
The signature key of StesCodes is also refered to as license key.
|
Trial Key
|
|
Inorder to use the trial key, you need to generate the trial signature key here
http://stescodes.com/trial.aspx by selecting the appropriate options from the option list. The key will be provided
based on the selection of plan. Moreover, the trial key is valid only for a week.
|
|
Downloads
|
|
StesCodes provides sample code for PHP and Dotnet versions. Please download the sample code below, configure it and then run it.
Once you find every thing is working, then go for integration with your code. The sample code is same for the licensed version and trial.
|
Sample Code
|
|
Download the Contact Grabber sample code below:
|
|
Contact Grabber
|
|
The next step after getting the signature key is to creating reference.
|
Reference
|
|
Add reference to the script file "StesCodes.js" file on your project, which helps to create formatted signature key.
To configure API keys in Gmail, Yahoo and Windows Live, click here
How to configure API keys.
Note: use StesCodes.getSignatureKey() to get the formatted signature key
|
|
Direct Authentication
|
|
Grab contacts using direct authentication with username and password. For Gmail, Yahoo and Windows Live use OAuth authentication to grab contacts.
|
|
Request
|
Post Parameters
servicename=<servicename>&
signature=<your formatted signature key>&
username=<your user name>&
password=<your password>&
format=<return format>
For Outlook
servicename=<servicename>&
signature=<your formatted signature key>&
filename=<http location of the file(should be valid web url)>&
CSVType=<type of csv>&
format=<return format>
|
|
Input Parameters
|
|
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. This field is required for all services
except outlook or csv grabbing requests.
|
Yes/No
|
|
4. filename
|
The http url of the csv file, The request url should be a online csv file url (eg:"http://stescodes.com/text.csv")
and localhost url won't work. This field is required only for outlook or csv grabbing
requests.
|
Yes/No
|
|
5. Password
|
Login password of the particular email server.
|
Yes
|
|
6. Format
|
|
Yes
|
|
|
Response
|
The return type is a of format JSON and XML, below are the example response of JSON
and XML formats.
JSON response:
[ { "name": "stescodes", "email" : "support@stescodes.com" } ]
XML response:
<?xml version="1.0" encoding="utf-8"?>
<servicename>
<contacts>
<name>stescodes</name>
<email>support@stescodes.com</email>
</contacts>
</servicename>
|
|
OAuth Authentication
|
|
To start grabbing contacts using OAuth Method, you have to make request to three functions in order.
|
|
GetAuthenticationUrl
|
|
Request for GetAuthenticationUrl
|
Make a request to https://stescodes.com/api.aspx using "GET" method
(Please url encode the parameter values).
https://stescodes.com/api.aspx?
ServiceName=<servicename>&
ConsumerKey=<your consumer key>&
ConsumerSecret=<your consumer secret key>&
CallbackUrl=<return url>&
PolicyUrl=<policy page url>&
format=<return format>
|
|
Input 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
|
|
6. Format
|
|
Yes
|
|
|
Response
|
The return type is a of format JSON and XML, below are the example response of JSON
and XML formats.
JSON response:
{ "token": "your token", "tokensecret" : "your token secret",
"authurl" : "your authentication url", "uid" : "User id" }
XML response:
<?xml version="1.0"?>
<ArrayOfAuthdetails xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<authdetails>
<token>your token</token>
<tokensecret>your token secret</tokensecret>
<authurl>your authentication url</authurl>
<uid>user id</uid>
</authdetails>
</ArrayOfAuthdetails>
|
|
GetAccessToken
|
|
Request for GetAccessToken
|
Make a request to https://stescodes.com/api.aspx using "GET" method
(Please url encode the parameter values).
https://stescodes.com/api.aspx?
ServiceName=<servicename>&
ConsumerKey=<your consumer key>&
ConsumerSecret=<your consumer secret key>&
CallbackUrl=<return url>&
Token=<your token>&
TokenSecret=<your token secret>&
TokenVerifier=<your token verifier>&
format=<return format>
|
|
Input 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 received after authentication.
|
Yes
|
|
6. TokenSecret
|
Your token secret
|
Yes
|
|
7. TokenVerifier
|
Token verifier received after authentication.
|
Yes
|
|
8. Format
|
|
Yes
|
|
|
Response
|
The return type is a of format JSON and XML, below are the example response of JSON
and XML formats.
JSON response:
{ "token": "your token", "tokensecret" : "your token secret",
"authurl" : "your authentication url", "uid" : "User id" }
XML response:
<?xml version="1.0"?>
<ArrayOfAuthdetails xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<authdetails>
<token>your token</token>
<tokensecret>your token secret</tokensecret>
<authurl>your authentication url</authurl>
<uid>user id</uid>
</authdetails>
</ArrayOfAuthdetails>
|
|
GrabContacts OAuth
|
|
Request for GrabContacts_OAuth
|
Make a request to https://stescodes.com/api.aspx using "POST" method,
to grab contacts from various mail servers (Please url encode the parameter values).
Post Parameters
ServiceName=<servicename>&
Signature=<your formatted signature key>&
Token=<your token>&
TokenSecret=<your token secret>&
TokenVerifier=<token verifier>&
Uid=<user id>&
ConsumerKey=<your api key>&
ConsumerSecret=<api secret key>&
format=<return format>
|
|
Input 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
|
Your access token.
|
Yes
|
|
3. TokenSecret
|
Your token secret
|
Yes
|
|
4. TokenVerifier
|
Your Token verifier.
|
Yes
|
|
5. Uid
|
Your user id
|
Yes
|
|
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
|
|
9. Format
|
|
Yes
|
|
|
Response
|
The return type is a of format JSON and XML, below are the example response of JSON
and XML formats.
JSON response:
[ { "name": "stescodes", "email" : "support@stescodes.com" } ]
XML response:
<?xml version="1.0" encoding="utf-8"?>
<servicename>
<contacts>
<name>stescodes</name>
<email>support@stescodes.com</email>
</contacts>
</servicename>
|
|
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.
|
|
|
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
|