我如何从LinkedIn Voyager API获得阅读收据?



我想看看最后一条消息是否已被我发送消息的人看到。我从这个端点得到了20个对话:https://www.linkedin.com/voyager/api/messaging/conversations我使用JSessions和cookie进行身份验证。这是我得到的其中一个对话:

{
"notificationStatus": "ACTIVE",
"read": true,
"groupChat": false,
"totalEventCount": 27,
"unreadCount": 0,
"lastActivityAt": 1613499552905,
"firstMessageUrn": "urn:li:fs_event:(6408489350996336640,S6408489350996336640_500)",
"backendUrn": "urn:li:messagingThread:2-MDYyMDFmMTUtMzk5NS01MTg2LWE1YWMtYzc2Y2JlYzNjYjE1XzAwMA==",
"receipts": [
{
"fromEntity": "urn:li:fs_miniProfile:ACoAACCRRgUBTOJXdRefeTMNta2hGPxadGDnNrA",
"seenReceipt": {
"seenAt": 1613498927377,
"eventUrn": "urn:li:fs_event:(6408489350996336640,S6767504989536559104_500)"
},
"fromParticipant": {
"string": "urn:li:member:546391557"
}
}
],
"archived": false,
"blocked": false,
"entityUrn": "urn:li:fs_conversation:6408489350996336640",
"viewerCurrentParticipant": true,
"featureTypes": [
"REACTIONS",
"CREATE_NEW_GROUP_CHAT"
],
"withNonConnection": false,
"muted": false,
"events": [
{
"createdAt": 1613499552888,
"reactionSummaries": [],
"dashEntityUrn": "urn:li:fsd_message:S6767507628659757056_500",
"quickReplyRecommendations": [],
"entityUrn": "urn:li:fs_event:(6408489350996336640,S6767507628659757056_500)",
"eventContent": {
"com.linkedin.voyager.messaging.event.MessageEvent": {
"messageBodyRenderFormat": "DEFAULT",
"body": "",
"attributedBody": {
"text": "some more text"
}
}
},
"subtype": "MEMBER_TO_MEMBER",
"from": {
"com.linkedin.voyager.messaging.MessagingMember": {
"miniProfile": {
"memorialized": false,
"firstName": "Sepideh",
"lastName": "Falah",
"occupation": "Software Engineer at SocialCycle",
"objectUrn": "urn:li:member:192299229",
"entityUrn": "urn:li:fs_miniProfile:ACoAAAt2QN0ByntmuEeEZB7874UZ84rt5wR4sL4",
"publicIdentifier": "sepideh-falah-33949854",
"picture": {
"com.linkedin.common.VectorImage": {
"artifacts": [
{
"width": 100,
"fileIdentifyingUrlPathSegment": "100_100/0/1516745437487?e=1619049600&v=beta&t=WXbHMyBCelbHjHoWSEVbi4TydR7qMeehH15FWpJYIao",
"expiresAt": 1619049600000,
"height": 100
},
{
"width": 200,
"fileIdentifyingUrlPathSegment": "200_200/0/1516745437487?e=1619049600&v=beta&t=66x3s8Hw5BvedUqu1RZ2TNazf2o0y9amUAJbKIx2nLI",
"expiresAt": 1619049600000,
"height": 200
},
{
"width": 400,
"fileIdentifyingUrlPathSegment": "400_400/0/1516745437487?e=1619049600&v=beta&t=MM1mHaQP6KTfNgJRIEuPQ0_2l76eA-DQbt0v4SiVs-0",
"expiresAt": 1619049600000,
"height": 400
},
{
"width": 800,
"fileIdentifyingUrlPathSegment": "800_800/0/1516745437487?e=1619049600&v=beta&t=YW7bUQO8Vpext2at7SW5FQhuot81Xk1HCnbJ_2jdjAI",
"expiresAt": 1619049600000,
"height": 800
}
],
"rootUrl": "https://media-exp1.licdn.com/dms/image/C5103AQEJ4t5ijWZ8Xg/profile-displayphoto-shrink_"
}
},
"trackingId": "ZJXqw5fwRdCZPQpx0d1yhw=="
},
"entityUrn": "urn:li:fs_messagingMember:(6408489350996336640,ACoAAAt2QN0ByntmuEeEZB7874UZ84rt5wR4sL4)",
"nameInitials": "SF"
}
},
"previousEventInConversation": "urn:li:fs_event:(6408489350996336640,S6767504989536559104_500)",
"originToken": "07ea6a5d-7450-4a22-b5f4-ceb599e16ab4",
"backendUrn": "urn:li:messagingMessage:2-MTYxMzQ5OTU1MjY4NGI3NTYwOS0wMDEmMDYyMDFmMTUtMzk5NS01MTg2LWE1YWMtYzc2Y2JlYzNjYjE1XzAwMA=="
}
],
"participants": [
{
"com.linkedin.voyager.messaging.MessagingMember": {
"miniProfile": {
"memorialized": false,
"firstName": "Trevor",
"lastName": "Johnson",
"occupation": "Software Developer at Axway",
"objectUrn": "urn:li:member:546391557",
"entityUrn": "urn:li:fs_miniProfile:ACoAACCRRgUBTOJXdRefeTMNta2hGPxadGDnNrA",
"publicIdentifier": "johnson-trevor",
"picture": {
"com.linkedin.common.VectorImage": {
"artifacts": [
{
"width": 100,
"fileIdentifyingUrlPathSegment": "100_100/0/1524789372523?e=1619049600&v=beta&t=9ystm3UQKcVGh6sc5OYOkc8NjA0KzGwo9XRrNOYZOJo",
"expiresAt": 1619049600000,
"height": 100
},
{
"width": 200,
"fileIdentifyingUrlPathSegment": "200_200/0/1524789372523?e=1619049600&v=beta&t=nIqjHKqUN9N2_cXGfG4iDcfxjJkC7DGGDKD_yawbm40",
"expiresAt": 1619049600000,
"height": 200
},
{
"width": 400,
"fileIdentifyingUrlPathSegment": "400_400/0/1524789372523?e=1619049600&v=beta&t=l1fwjGmn-cxqwc5S-1IF5Y1HWg99akHkUQt3caorZPA",
"expiresAt": 1619049600000,
"height": 400
},
{
"width": 800,
"fileIdentifyingUrlPathSegment": "800_800/0/1524789372523?e=1619049600&v=beta&t=pj8u5JMqmLVuEFKNSbPT8fg7UfXTDE82wsJ6Uc6Urio",
"expiresAt": 1619049600000,
"height": 800
}
],
"rootUrl": "https://media-exp1.licdn.com/dms/image/C5603AQGDs9cCCR0HSw/profile-displayphoto-shrink_"
}
},
"trackingId": "Yvzot8irQWmbRWKMpIRKKg=="
},
"entityUrn": "urn:li:fs_messagingMember:(6408489350996336640,ACoAACCRRgUBTOJXdRefeTMNta2hGPxadGDnNrA)",
"nameInitials": "TJ"
}
}
]
}

conversationUrn附加到您正在使用的链接。

我看到"entityUrn": "urn:li:fs_conversation:6408489350996336640"

在这种情况下URL将是:https://www.linkedin.com/voyager/api/messaging/conversations/6408489350996336640/events

它将返回上面指定的会话1的消息(事件)列表,以及每条消息的详细信息。

顺便说一句,有趣的是,在你的情况下,conversationUrn6408489350996336640。通常是2-MGQxMGNkMTctNGIxOS00N2RhLTgyMmUtNDE0MzAyYjI1ODRkXzAxMg==

最新更新