Stay organized with collections
Save and categorize content based on your preferences.
A message that a user sent to the agent.
The UserMessage appears in the "data" field of the "message" object that the agent receives from its Google Pub/Sub subscription. The "data" field is a base64-encoded string that the agent must decode to match the UserMessage structure.
JSON representation
{"senderPhoneNumber": string,"messageId": string,"sendTime": string,"agentId": string,// Union field content can be only one of the following:"text": string,"userFile": {object (UserFile)},"location": {object (LatLng)},"suggestionResponse": {object (SuggestionResponse)}// End of list of possible types for union field content.}
Fields
senderPhoneNumber
string
Phone number (in E.164 format) of the user that sent the message.
messageId
string
A unique message ID, assigned by the sending user's RCS client.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
agentId
string
The agent's unique identifier. Set by RCS Business Messaging.
Union field content. Content of the message content can be only one of the following:
text
string
Text, specifically a string created through organic user typing and not a suggested reply.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-27 UTC."],[[["UserMessage data is received by the agent in a base64-encoded string within the \"data\" field of the \"message\" object, which must be decoded."],["The UserMessage includes fields such as `senderPhoneNumber`, `messageId`, `sendTime`, and `agentId`, providing details about the sender and message metadata."],["The `content` field of a UserMessage can represent various types of user input, including `text`, `userFile`, `location`, or `suggestionResponse`."],["`sendTime` follows RFC 3339 format, which supports fractional digits and time offsets, ensuring precise time information."],["The `senderPhoneNumber` is the user's number in E.164 format, and `messageId` is a unique identifier assigned to the message by the user's RCS client."]]],[]]