Manage reactions
Learn how to manage message reactions on LinkedIn using Unipile API.
Users can react to Messages. LinkedIn use Emojis as message reactions.
Provider limitationsReactions are not available on Recruiter and Sales navigator.
List detailed reactions
Each Message object have a reactions counter. But if you want details on who reacted what, use the List all Message's Reactions endpoint and provide the Message ID.
const { data } = await messagingApi.getMessageReactionsList({
path: {
account_id: "acc_123456789",
chat_id: "chat_id",
message_id: "message_id",
},
query: {
limit: 20,
},
});reactions = messaging_api.get_message_reactions_list(
"chat_id",
"message_id",
"acc_123456789",
limit=20,
)curl --request GET \
--url https://api.unipile.com/v2/account_id/chats/chat_id/messages/message_id/reactions \
--header 'accept: application/json'React to a message
To react to a message, use the Add a Message Reaction endpoint, specifying the message ID and the Emoji.
Each user can send as many different reactions as they wish.
await messagingApi.addMessageReaction({
path: {
account_id: "acc_123456789",
chat_id: "chat_id",
message_id: "message_id",
},
body: {
reaction: '🔥',
},
});messaging_api.add_message_reaction(
"chat_id",
"message_id",
"acc_123456789",
{"reaction": "🔥"},
)curl --request POST \
--url https://api.unipile.com/v2/account_id/chats/chat_id/messages/message_id/reactions \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"reaction":"🔥"}'Remove a reaction
To remove a reaction from a message, use the Remove a Message Reaction endpoint, specifying the message ID and the Emoji to be removed.
await messagingApi.removeMessageReaction({
path: {
account_id: "acc_123456789",
chat_id: "chat_id",
message_id: "message_id",
},
body: {
reaction: '🔥',
},
});messaging_api.remove_message_reaction(
"chat_id",
"message_id",
"acc_123456789",
{"reaction": "🔥"},
)curl --request DELETE \
--url https://api.unipile.com/v2/account_id/chats/chat_id/messages/message_id/reactions \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"reaction":"🔥"}'Be notified about reactions
To receive notifications when a new reaction is added to a message, Configure a webhook to listen to message.reaction.new events.
Updated 3 months ago