Receiving messages
Inbound messages
In this section, you can find sample messages of every inbound message type supported by the Channels API from Google RCS. The code snippets in every subsection demonstrate how a Google RCS message is converted into a Channels API message.
See the following pages to understand more about retrieving messages or message statuses
Text
Text message
{
"id": "3c6d204d-09d4-44b0-81a2-6e33dfdf409c",
"channelId": "cc79a83e-ae28-4d20-9576-cd6ef76641a2",
"sender": {
"contact": {
"id": "46623801-a627-4a3f-9523-363c501d459d",
"identifierKey": "phonenumber",
"identifierValue": "+447123456789"
}
},
"receiver": {
"connector": {
"id": "004fe352-2e89-4b8a-a841-f401d8367a64",
"identifierValue": "[email protected]"
}
},
"body": {
"type": "text",
"text": {
"text": "Incoming message"
}
},
"meta": {},
"reference": "",
"parts": [
{
"platformReference": "Mx9qo66enZS0mxgbBE7XiQDg"
}
],
"status": "delivered",
"reason": "",
"direction": "incoming",
"chargeableUnits": 1,
"lastStatusAt": "2024-08-09T11:08:40.243Z",
"createdAt": "2024-08-09T11:08:40.068Z",
"updatedAt": "2024-08-09T11:08:40.243Z"
}
Text message from quick reply button
{
"id": "ed0098c8-4e8f-4b2b-a335-faec7a9b2d3f",
"channelId": "cc79a83e-ae28-4d20-9576-cd6ef76641a2",
"sender": {
"contact": {
"id": "46623801-a627-4a3f-9523-363c501d459d",
"identifierKey": "phonenumber",
"identifierValue": "+447123456789"
}
},
"receiver": {
"connector": {
"id": "004fe352-2e89-4b8a-a841-f401d8367a64",
"identifierValue": "[email protected]"
}
},
"body": {
"type": "text",
"text": {
"text": "Reply action 1",
"actions": [
{
"type": "postback",
"postback": {
"text": "Reply action 1",
"payload": "item_1"
}
}
]
}
},
"meta": {},
"reference": "",
"parts": [
{
"platformReference": "MxTnFlioslRN-W-lVPEgg09w"
}
],
"status": "delivered",
"reason": "",
"direction": "incoming",
"chargeableUnits": 1,
"lastStatusAt": "2024-08-09T09:57:07.11Z",
"createdAt": "2024-08-09T09:57:06.911Z",
"updatedAt": "2024-08-09T09:57:07.11Z"
}
Text message from postback button
{
"id": "f0142250-56bc-4d0c-a93d-632d684c8a88",
"channelId": "cc79a83e-ae28-4d20-9576-cd6ef76641a2",
"sender": {
"contact": {
"id": "46623801-a627-4a3f-9523-363c501d459d",
"identifierKey": "phonenumber",
"identifierValue": "+447123456789"
}
},
"receiver": {
"connector": {
"id": "004fe352-2e89-4b8a-a841-f401d8367a64",
"identifierValue": "[email protected]"
}
},
"body": {
"type": "text",
"text": {
"text": "Postback action 1",
"actions": [
{
"type": "postback",
"postback": {
"text": "Postback action 1",
"payload": "postback-payload-1"
}
}
]
}
},
"meta": {},
"reference": "",
"parts": [
{
"platformReference": "Mxg7WMFjFuQIO8Q7WhozzRWQ"
}
],
"status": "delivered",
"reason": "",
"direction": "incoming",
"chargeableUnits": 1,
"lastStatusAt": "2024-08-09T09:58:23.637Z",
"createdAt": "2024-08-09T09:58:23.481Z",
"updatedAt": "2024-08-09T09:58:23.637Z"
}
Image
{
"id": "f9543b05-1807-4086-abb3-f19939378f48",
"channelId": "cc79a83e-ae28-4d20-9576-cd6ef76641a2",
"sender": {
"contact": {
"id": "46623801-a627-4a3f-9523-363c501d459d",
"identifierKey": "phonenumber",
"identifierValue": "+447123456789"
}
},
"receiver": {
"connector": {
"id": "004fe352-2e89-4b8a-a841-f401d8367a64",
"identifierValue": "[email protected]"
}
},
"body": {
"type": "image",
"image": {
"text": "1000000216.jpg",
"images": [
{
"mediaUrl": "https://media.api.sandbox.bird.one/workspaces/ed06c631-ca43-47cc-b4a7-a7e2b141b22e/messages/f9543b05-1807-4086-abb3-f19939378f48/media/81654b61-281d-41cc-85c3-1f64c4d1fe0f",
"mediaPreviewUrl": "https://media.api.sandbox.bird.one/workspaces/ed06c631-ca43-47cc-b4a7-a7e2b141b22e/messages/f9543b05-1807-4086-abb3-f19939378f48/media/80e8810c-2c88-459a-85c2-0bc89a119888"
}
]
}
},
"meta": {},
"reference": "",
"parts": [
{
"platformReference": "Mxsgab7Ro4TwimtIVr1u2NkA"
}
],
"status": "delivered",
"reason": "",
"direction": "incoming",
"chargeableUnits": 1,
"lastStatusAt": "2024-08-09T11:25:30.651Z",
"createdAt": "2024-08-09T11:25:30.547Z",
"updatedAt": "2024-08-09T11:25:30.651Z"
}
File
{
"id": "7f45ec8b-e6f5-44d1-9eee-73ebc1469304",
"channelId": "cc79a83e-ae28-4d20-9576-cd6ef76641a2",
"sender": {
"contact": {
"id": "46623801-a627-4a3f-9523-363c501d459d",
"identifierKey": "phonenumber",
"identifierValue": "+447123456789"
}
},
"receiver": {
"connector": {
"id": "004fe352-2e89-4b8a-a841-f401d8367a64",
"identifierValue": "[email protected]"
}
},
"body": {
"type": "file",
"file": {
"text": "video:1000000219.mp4",
"files": [
{
"contentType": "video/mp4",
"mediaUrl": "https://media.api.sandbox.bird.one/workspaces/ed06c631-ca43-47cc-b4a7-a7e2b141b22e/messages/7f45ec8b-e6f5-44d1-9eee-73ebc1469304/media/b2960aab-ea20-4e29-9f90-eb653835afe0",
"filename": "video:1000000219.mp4"
}
]
}
},
"meta": {},
"reference": "",
"parts": [
{
"platformReference": "MxUukEgnBnQw6ewuM0=o0rCw"
}
],
"status": "delivered",
"reason": "",
"direction": "incoming",
"chargeableUnits": 1,
"lastStatusAt": "2024-08-09T11:30:02.223Z",
"createdAt": "2024-08-09T11:30:02.096Z",
"updatedAt": "2024-08-09T11:30:02.223Z"
}
Location
{
"id": "e83c4ebe-9855-4e9f-9860-40d858bd0e84",
"channelId": "cc79a83e-ae28-4d20-9576-cd6ef76641a2",
"sender": {
"contact": {
"id": "46623801-a627-4a3f-9523-363c501d459d",
"identifierKey": "phonenumber",
"identifierValue": "+447123456789"
}
},
"receiver": {
"connector": {
"id": "004fe352-2e89-4b8a-a841-f401d8367a64",
"identifierValue": "[email protected]"
}
},
"body": {
"type": "location",
"location": {
"coordinates": {
"latitude": 52.365879,
"longitude": 4.917415
},
"location": {
"address": "9W88+9X Amsterdam, Netherlands",
"label": "9W88+9X Amsterdam, Netherlands"
}
}
},
"meta": {},
"reference": "",
"parts": [
{
"platformReference": "MxqKsrf2g5Su6l21IG5RnLtg"
}
],
"status": "delivered",
"reason": "",
"direction": "incoming",
"chargeableUnits": 1,
"lastStatusAt": "2024-08-09T11:33:15.133Z",
"createdAt": "2024-08-09T11:33:14.976Z",
"updatedAt": "2024-08-09T11:33:15.133Z"
}
Last updated
Was this helpful?