The Techjoomla Blog

Stay updated with all the latest happenings at Techjoomla. From news about the developments in your favourite extensions to Tips & Tricks about the Joomla CMS, Framework & Development.
Font size: +
1 minute reading time (291 words)

How to use Hotmail REST API to import contacts


Importing contacts using Hotmail API works in three steps:
1. Getting Request Token:

Use the following URL to request token form Hotmail.
  • client_id(represented here by CLIENT_ID) is the one that you received when you registered your app in the Live Connect app management site.
  • scope parameter has to be "wl.signin+wl.basic+wl.contacts_emails" in case of Importing Email contacts
  • response_type parameter is set to code, which requests an authorization code.
  • redirect_uri parameter (represented here by REDIRECT_URL) is the URL that Live Connect returns users to after they sign in. 

2. Getting access token:

After the user successfully signs in and consents to the requested scopes, the Live Connect authorization web service uses the value of the redirect Uniform Resource Identifier (URI) to return the user to your site, and gives your app an authorization code as represented here by the string of characters that follow ?code=.

You can now use this authorization code to obtain an access token—the unique string of characters that allows your app to get a user's info from a service that is compatible with Live Connect. To request an access token, your app must include its client ID, a redirect URI, its client secret, the authorization code, and the grant_type parameter set to authorization_code, like this.

Content-type: application/x-www-form-urlencoded

3. Getting Contacts:

Use the following URL to request token form Hotmail.;

With this you will get the data in following format. 


"data": [


"id": "contact.ece6f2d6000000000000000000000000",

"first_name": "ABC",

"last_name": "XYZ",

"name": "ABC XYZ",

"is_friend": false,

"is_favorite": false,

"user_id": null,

"email_hashes": [



"updated_time": "2013-09-02T07:16:22+0000",

"emails": {

"preferred": "[email protected]",

"account": null,

"personal": "[email protected]",

"business": null,

"other": null





Here required emails are present along with email_hashes which you can easily use for sending mails.

Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

Invitex 2.7.4 released
Quick2Cart 2.0.1 version released

Related Posts