0

I am trying to import contacts from Hotmail in Asp.Net Project but I am unable to find proper documentation that's working . is there any changes microsoft made . I have read somewhere that microsoft is not allowing to share this info.

I have used following two links but Link info redirects us to onedrive

http://gnillydev.blogspot.in/2007/10/live-msn-hotmail-contacts-importing-in.html

Heemanshu Bhalla
  • 3,603
  • 1
  • 27
  • 53

2 Answers2

3

Yes, a lot has changed in Microsoft when subject is contacts importing.

Client

Now MSN, Hotmail and WindowsLive are all under Outlook.com. I.e., you must import your contacts from Outlook.com in order to get your contacts from all the these clients (including Hotmail).

Importing Protocol

Microsoft used, until few years ago, a custom protocol very close to OAuth (v1), called DeLauth. But, thanks God, now they're more towards to the existing standards, and now we can import contacts using the standard OAuth v2.

It's called Live Connect and you can read more about it here.

If you need to learn about OAuth2, I like this tutorial.

How to Implement

As you're using asp.net, you'll need to use the Authorization code grant flow (in above tutorial called Authorization code flow).

Basically: after register (one time only) your web app with Microsoft (requesting to use the Contacts API), you'll need to display to the user a hyperlink. User will click and a consent popup will be displayed.

Probably you already faced this consent popup in modern apps/games or websites asking grants like "Foo wants to access your profile info", etc.

Once user granted access to the API you want to use, then you'll receive an access code (which is temporary). Now using HTTPRequest class, you'll use this code to request the access token.

Then now finally, with this access token, you can make the API calls. Using again the HTTPRequest class.

Easy Path

You can find more Live Connect questions here in SO, like this good one.

Additionally, you can use ready-to-use solutions, like CloudSponge.com (with the benefit of support other address book sources). Disclaimer: I work for CloudSponge.

Community
  • 1
  • 1
Rael Gugelmin Cunha
  • 3,327
  • 30
  • 25
  • Thanks for your information can you tell me some more about this line - just some more explanation that everytime a user click on URL I will receive a access code . Is that right ?? This line ----- Once user granted access to the API you want to use, then you'll receive an access code (which is temporary). Now using HTTPRequest class, you'll use this code to request the access token. – Heemanshu Bhalla Mar 31 '15 at 12:41
  • Yes, every time you'll receive the access code after user grant you access, and then you'll need to switch by the access token. The only step will be skipped sometimes is during user interaction (with no effect for your code): usually if user granted access to your app, Microsoft will store this setting (that user X granted access to your app, which can be revoked by the user). If you want to use a bit longer access (as the `access token` expires), you can use the **refresh token** to renew your `access token`. – Rael Gugelmin Cunha Mar 31 '15 at 13:32
  • ok thanks , I think what i need cannot not updated . But very thanks for information you provided – Heemanshu Bhalla Mar 31 '15 at 14:19
  • Actually I need a simple procedure . Like - a button when any user that is registered on website when click on that button a popup shows that authenticates user's account then get permission for access contacts and then show the contacts No need to contact the owner for access code again and again – Heemanshu Bhalla Apr 01 '15 at 06:17
  • But your app is the one supposed to request the access code to the address book provider. User will just click in the button and see the popup requesting access. You can see a demo of user interaction here: http://cloudsponge.com/test-drive – Rael Gugelmin Cunha Apr 01 '15 at 11:35
0

i'm not positive but you probably have to export from hotmail first, into a csv file (for ex), then work with that.

wazz
  • 4,953
  • 5
  • 20
  • 34
  • yes, this can be done or we can export them first to gmail and then do that . I just want to implement a functionality in my website to invite friends by importing Hotmail option that's why I was searching for this – Heemanshu Bhalla Mar 31 '15 at 07:55