API Command: send_chat_message

The send_chat_message operation sends a chat message to an existing session. All members of the session will see the chat message. The chat message can be sent on behalf of an existing member of the session, such as a customer or a representative, or it can be sent as a System message. The chat bot uses this API to send the end user's chat messages to the representative.

The command API is an authenticated API. For instructions on using authenticated APIs using OAuth, see Authenticate to the Remote Support API. The API account must have read-only or full access to the command API.

Required Parameters for send_chat_message

lsid The unique ID of the local user account to login as.
username The username of the local user account to login as.

Either user_id or username must be provided. This user cannot already be logged in. Each API account can create only one virtual representative at a time.

Query Examples: send_chat_message

text and example
  • https://support.example.com/api/command?action=: send_chat_message
text and example
  • https://...

 

If you experience a high volume of support requests, repeatedly calling a command such as get_logged_in_reps or get_support_teams might bottleneck your system. Therefore, a best practice is to not request a list of representatives or teams with each support request. Instead, if making the same API call in succession, consider caching the results for a period of time and reusing them. New sessions requests should reference the cached list instead of calling for the list each time.