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.

POST https://login.live.com/oauth20_token.srf
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.

Invitex 2.7.4 released
Adding sidebar filters in your extension Joomla 3....

Related Posts


By accepting you will be accessing a service provided by a third-party external to https://techjoomla.com/