Initialize the SDK with Your Personal Access Token.
Open this browser's inspection tools to view the console.
After this app initializes it calls the listen() function on the SDK's message, membership, and rooms objects, and registers handlers for the events. These handlers simply log the content of the events in the console window. To see this activity, open a Webex web client and create rooms, memberships or messages. These activities will generate an event which will fire and display in the console.
See the Webex Webhook Documentation for more information on the payloads of the membership, message and room events. In general the SDK events closely match the payload of the webhooks, except in cases where the information in a traditional webhook envelope doesn't make sense, for example there is no name, targetUrl, or secret field in the SDK event envelopes.
The SDK adds one event which is not yet supported in the webhooks. A memberships:seen event is generated when a Webex client sends a "read receipt". The membership:seen event will include a lastSeenId field with the id of the last message read by the user.
View the source for this app