The client can send information about its type, for example, mobile, desktop, browser type, OS version, etc. In this tutorial, we will see how to attach this information to client requests, and where to read the equivalent information about the agent.

In order to send client properties, repeat the Getting Started tutorial. In Step 3, you are asked to open a new connection. Instead of the shell command written there, use the following command:

wscat -k 60 -H "Authorization:jwt $LP_JWT" -H "Client-Properties:$LP_PROPS" -c "wss://$LP_ASYNCMESSAGINGENT/ws_api/account/$LP_ACCOUNT/messaging/consumer?v=3"

After sending a text message in Step 5, the device type and OS will be displayed in the Agent Workspace under the Consumer Info table:


Other ClientProperties that can be sent can be found in the API Reference.

This object can be used as part of the websocket headers, or as part of the InitConnection request.

JSON Output

JSON Schema

You can find the json schema definition of this message here: assets/schema/infra/clientPropertiesHeader.json