Message interactions

You can list message interactions on a specific message using the following endpoint. In order to get a Google RCS message, you must have an active Google RCS channel and perform a HTTP request with a valid access key.

List message interactions

List message interactions

GET/workspaces/{workspaceId}/channels/{channelId}/messages/{messageId}/interactions
Authorization
Path parameters
workspaceId*string (uuid)

The ID of the workspace

messageId*string (uuid)

The ID for a message

channelId*string (uuid)

The ID for a channel

Response

OK

Body
resultsarray of ChannelMessageInteraction
Request
const response = await fetch('/workspaces/{workspaceId}/channels/{channelId}/messages/{messageId}/interactions', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "messageId": "123e4567-e89b-12d3-a456-426614174000",
      "channelId": "123e4567-e89b-12d3-a456-426614174000",
      "platformId": "text",
      "type": "clicked",
      "messageReference": "text",
      "messagePartsCount": 0,
      "messageTags": [
        "text"
      ],
      "receiver": {
        "connector": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "identifierValue": "text",
          "annotations": {
            "name": "text"
          },
          "types": [
            "text"
          ]
        }
      },
      "createdAt": "2024-12-21T12:20:17.936Z",
      "details": "text",
      "context": {
        "id": "text",
        "type": "text",
        "tags": [
          "text"
        ]
      },
      "metadata": {
        "link": {
          "name": "text",
          "url": "text"
        },
        "button": {
          "payload": "text"
        },
        "reaction": {
          "emoji": "text",
          "action": "text"
        },
        "prefetched": false
      }
    }
  ]
}

Google RCS supports the following message interactions:

Interaction
Description

Read

A user has read a message

Clicked

A user has clicked a quick reply button

Additional information about the interactions can be found in the details field and metadata.button object as follows:

Interaction
details
metadata.button.
Description

Clicked (Suggestions)

item_N_clicked

  • payload - user supplied payload sent in action button

Recipient clicked a suggestion. N = the position of the item in the actions array of the associated message

Clicked (Card Actions)

card_N1_item_item_N2_clicked

payload - user supplied payload sent in action button

Recipient clicked a card action.

N1 = the position of the card e.g. 1st card in a carousel N2 = the position of the action on the card e.g. the second button on a specific card

Examples

Read interaction

{
  "id": "de476f9b-5966-11ef-90fc-0a58a9feac01",
  "type": "read",
  "createdAt": "2024-08-13T11:26:21.19271Z",
  "messageId": "2e22e26a-c876-4ea1-9e87-8ace0eb5dfc1",
  "channelId": "cc79a83e-ae28-4d20-9576-cd6ef76641a1",
  "platformId": "rcs-google",
  "messageReference": "7af126ba-8861-4d38-84b8-a613f982b9a9",
  "messagePartsCount": 1,
  "receiver": {
    "contacts": [
      {
        "id": "46623801-a627-4a3f-9523-363c501d459d",
        "identifierKey": "phonenumber",
        "identifierValue": "+447123456789",
        "receiverValue": "+447123456789",
        "type": "to",
        "countryCode": "GB"
      }
    ]
  }
}

Clicked interaction

{
  "id": "dee91f17-5966-11ef-8508-0a58a9feac01",
  "type": "clicked",
  "createdAt": "2024-08-13T11:26:22.035459Z",
  "messageId": "2e22e26a-c876-4ea1-9e87-8ace0eb5dfc1",
  "channelId": "cc79a83e-ae28-4d20-9576-cd6ef76641a1",
  "platformId": "rcs-google",
  "messageReference": "7af126ba-8861-4d38-84b8-a613f982b9a9",
  "messagePartsCount": 1,
  "receiver": {
    "contacts": [
      {
        "id": "46623801-a627-4a3f-9523-363c501d459d",
        "identifierKey": "phonenumber",
        "identifierValue": "+447123456789",
        "receiverValue": "+447123456789",
        "type": "to",
        "countryCode": "GB"
      }
    ]
  },
  "details": "card_0_item_1_clicked",
  "metadata": {
    "button": {
      "payload": "website"
    }
  }
}

Last updated