如何请求雅虎用户信息和联系人列表

Posted

技术标签:

【中文标题】如何请求雅虎用户信息和联系人列表【英文标题】:how to request yahoo userInfo and contact list 【发布时间】:2020-10-08 06:43:00 【问题描述】:

如here 所述,用于致电https://api.login.yahoo.com/openid/v1/userinfo 首先我调用了https://api.login.yahoo.com/oauth2/get_token API 并获得了 access_token,然后根据指南将访问令牌传递给 userInfo API,但没有得到响应。 邮递员请求:

get Method:
URL: https://api.login.yahoo.com/openid/v1/userinfo
header: Authorization : Bearer <access token>
response status 403Forbidden

post Method:
URL: https://api.login.yahoo.com/openid/v1/userinfo
header: Authorization : Bearer <access token>
response status 403Forbidden

post Method:
URL: https://api.login.yahoo.com/openid/v1/userinfo
body: "access_token": "Bearer <access token>"
response status 400Bad Request


    "error": 
        "localizedMessage": "client request is not acceptable or not supported",
        "errorId": "INVALID_INPUT",
        "message": "client request is not acceptable or not supported"
    

那我该怎么办? 还请帮助我如何获取联系人列表?

【问题讨论】:

【参考方案1】:

我解决了,问题是我在 yahoo 中创建应用程序时忘记授予对配置文件 API 的访问权限。所以在授予访问权限后,它工作正常

【讨论】:

以上是关于如何请求雅虎用户信息和联系人列表的主要内容,如果未能解决你的问题,请参考以下文章

如何通过 Firebase 邀请通过动态链接发送用户信息

Oauth2.0原理

窃取5亿雅虎用户信息的黑客 被判处5年有期徒刑

如何在 Flutter 中请求和检查权限

Session和Cookie的区别和联系

如何从 Lync 联系人卡片中获取用户的电话号码或其他联系人详细信息?