我正在使用linkedin Oauth (我的应用程序在作用域r_emailaddress上完全工作并正确设置),我似乎无法返回电子邮件,我可以用curl返回它,但不能用我的代码返回它。
const userEmail = await fetch("https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))", {
method: "GET",
headers: {
"Authorization": "Bearer " + accessToken,
"Accept": "application/json"
}
});
const userMail = await userEmail.json();
console.log(userMail)此代码返回elements: [ { 'handle~': [Object], handle: 'urn:li:emailAddress:8238802378' } ]
"elements": [{"handle~": {"emailAddress": "example.dev@gmail.com"},"handle": "urn:li:emailAddress:8238802378"}]应否
发布于 2022-02-07 00:29:10
LOL,这个修复了userMail.elements[0]["handle~"].emailAddress,多亏了Xrysh✅
https://stackoverflow.com/questions/70966052
复制相似问题