Get contact's phone numbers from Windows Live

99 Views Asked by At

I am trying to import contacts from Windows Live using Javascript this is my code:

WL.init({
    client_id:     "CLIENT_ID",
    redirect_uri:  "https://redirect_uri.php",
    scope:         [ "wl.signin", "wl.basic", "wl.contacts_emails", "wl.phone_numbers"],
    response_type: "token"
});

WL.login({
        scope: ["wl.basic", "wl.contacts_emails", "wl.phone_numbers"]
    }).then(function (resp) {
            WL.api({
                path:   "me/contacts",
                method: "GET"
            }).then(function (response) {
                    console.log("response ", response);
                }, function (responseFailed) {
                    console.log('responseFailed ', responseFailed);
                });

        }, function (responseFailed) {
        });

I get the contacts basic info plus their emails, but no phone numbers. I looked at the API docs and did not see anything about importing contacts phone numbers. Does anybody know of a way to get the contact's phone numbers?

1

There are 1 best solutions below

0
ecorvo On

I found the answer in this question:

Importing Windows Live Contacts

Turns out there is an undocumented scope param

wl.contacts_phone_numbers