I would like to get the contacts of the Hotmail address book when a user gives our site permission to import them. To able to accomplish this I’m using a default oauth wrapper which seems to work for at least Google Gmail and Twitter.
It seems I can get an access token and get the information about the contacts. Unfortunately the email addresses are not included in the server response. Besides that the code I’m currently using to get contacts isn’t standard OAuth protocol but some improvised request. See below.
$return_array = array();
$headers = array("Accept: application/json",
"Content-Type: application/json",
"Authorization: WRAP access_token=".$request['wrap_access_token']);
$url = "http://apis.live.net/V4.1/cid-".$request['uid'].'/Contacts/AllContacts';
$curl = curl_init($url);
curl_setopt($curl,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$retour = json_decode(curl_exec($curl),true);
($request['wrap_access_token'] & $request['uid'] I got these from a "standaard" OAuth request. )
I use [
consent.live.com...] to request a requesttoken
and [
consent.live.com...] to get an access token. It seems incorrect to use the [
apis.live.net...] for retreiving the contacts?
Is there anyone who knows how to get the contacts of Hotmail with a standard OAuth request?