Docs / Messages
get_message
Read one message.
This action only reads. It changes nothing, so it is safe to try.
What you give it
| Input | What it is | Where to get it |
|---|---|---|
messageIdneeded | A message id. The message id (from list_chat_messages). | Run list_chat_messages and use messages[].id from its answer.7 more places to get it
|
connectionIdoptional | A connection id. Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one. | Run list_linkedin_accounts and use accounts[].id from its answer.15 more places to get it
|
Call it
curl -X POST https://api.heyreagent.com/v1/actions/get_message \
-H "Authorization: Bearer YOUR_KEY" \
-H "content-type: application/json" \
-d '{"messageId":"PASTE_MESSAGE_ID_HERE"}'The same call in JavaScript
const response = await fetch("https://api.heyreagent.com/v1/actions/get_message", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_KEY",
"content-type": "application/json",
},
body: JSON.stringify({
"messageId": "PASTE_MESSAGE_ID_HERE"
}),
});
const answer = await response.json();
console.log(answer);The same call in Python
import requests
response = requests.post(
"https://api.heyreagent.com/v1/actions/get_message",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"messageId": "PASTE_MESSAGE_ID_HERE",
},
)
print(response.json())The same call in n8n
Add an HTTP Request node and fill it in like this:
| Method | POST |
| URL | https://api.heyreagent.com/v1/actions/get_message |
| Send Headers | On. Name Authorization, Value Bearer YOUR_KEY |
| Send Body | On. Body Content Type JSON, Specify Body Using JSON, then paste the body below |
{
"messageId": "PASTE_MESSAGE_ID_HERE"
}Put your own key where it says YOUR_KEY. Put your own value where it says PASTE_…_HERE: the table above says where each one comes from. New here? Start with your first call.
What you get back
When it worked, the answer is { "ok": true, "result": { … } }. Inside result:
messageId | string |
providerId | string |
senderId | A member id. Other actions take it. |
text | string or null |
attachments[].id | A attachment id. Other actions take it. |
attachments[].fileSize | number |
attachments[].unavailable | boolean |
attachments[].mimetype | string |
attachments[].url | string |
attachments[].urlExpiresAt | number |
attachments[].type | poll |
attachments[].sticker | boolean |
attachments[].gif | boolean |
attachments[].duration | number |
attachments[].voiceNote | boolean |
attachments[].fileName | string |
attachments[].startsAt | number or null |
attachments[].expiresAt | number or null |
attachments[].timeRange | number or null |
attachments[].displayName | string or null |
attachments[].organization | string or null |
id | A message id. Other actions take it. |
chatId | A chat id. Other actions take it. |
chatProviderId | string |
timestamp | string |
isSender | 0 | 1 |
quoted.messageId | string |
quoted.providerId | string |
quoted.senderId | string |
quoted.text | string or null |
isForwarded | boolean |
isViewOnce | boolean |
reactions[].value | string |
reactions[].senderId | string |
reactions[].isSender | boolean |
seen | 0 | 1 |
hidden | 0 | 1 |
deleted | 0 | 1 |
edited | 0 | 1 |
isEvent | 0 | 1 |
delivered | 0 | 1 |
behavior | 0 or null |
eventType | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
original | string |
replies | number |
replyBy | string[] |
parent | string |
senderAttendeeId | A attendee id. Other actions take it. |
subject | string or null |
messageType | MESSAGE | INVITATION | INMAIL | INMAIL_DECLINE | INMAIL_REPLY | INMAIL_ACCEPT | STORY_MENTION | STORY_REPLY | CONTACT |
attendeeType | MEMBER | ORGANIZATION | OTHER |
attendeeDistance | 1 | 2 | 3 | 4 | -1 |
senderUrn | string |
replyTo.id | string |
replyTo.providerId | string |
replyTo.timestamp | string |
replyTo.senderAttendeeId | string |
replyTo.senderId | string |
replyTo.text | string or null |
A field that does not apply to an answer is left out, or is null. There are 97 more fields nested inside these.
When it did not work, the answer is { "ok": false, "error": "…", "message": "…" }. What each error means.
In Claude or ChatGPT
Once connected, ask in your own words. The assistant sees this action as a tool with the same name, get_message, and the same inputs.