使用Windows Live/OneDrive REST API获取联系人的电话号码和电子邮件 [英] Get contact's phone numbers and emails using the Windows Live/OneDrive REST API

查看:242
本文介绍了使用Windows Live/OneDrive REST API获取联系人的电话号码和电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人成功使用Live SDK(也称为OneDrive SDK)检索用户联系人的电子邮件地址和/或电话号码吗?

Has anyone successfully used the Live SDK (also called OneDrive SDK) to retrieve the email addresses and/or phone numbers of an user's contacts ?

我能做的最好的事情就是获取用户联系人的配置文件,但它仅包含哈希电子邮件地址,不包含电话号码,例如:

The best I have been able to do is the get profiles for a users contacts but it only includes hashed email addresses and no phone numbers, like this for example :

{
  "id": "contact.1e680c06000000000000000000000006",
  "first_name": "James",
  "last_name": "Cameron",
  "name": "James Cameron", 
  "gender": null,
  "is_friend": false, 
  "is_favorite": false,
  "user_id": null, 
  "email_hashes": [ "3972d8781911deba416ecf8e44dcc5f4dae92ab9aac58520bcfa480c31ea38f5", "301e45d554a7978c2a8ef1e662876411dfbca4b89535d2362dff3f6d786366b7" ],
  "updated_time": "2011-07-21T20:31:11+0000"
}

推荐答案

所有您需要做的就是将以下作用域添加到您要请求的作用域列表中:

All you need to do is add the following scope to your list of scopes you're requesting:

"wl.contacts_emails"

"wl.contacts_emails"

例如

WL.login({scopes: ["wl.contacts_emails"]});

这篇关于使用Windows Live/OneDrive REST API获取联系人的电话号码和电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆