Suggestions

close search

Session Monitoring

Register to receive real-time session event callbacks and monitor your session activity from your app server.

Note: This is a beta feature. Please send comments and issue reports for the session monitoring beta program to sessionmonitoring-beta@tokbox.com.

Using the OpenTok platform, developers can monitor certain activity of clients using OpenTok client SDKs, from within their app server. By registering for callbacks with the OpenTok REST API, your callback URL will receive HTTP POST requests when any client connects or publishes to a session in your OpenTok project. Additionally, you can register a callback to monitor events related to OpenTok archives for your project.

Registering callbacks

Session events and archive status updates information can all be registered to HTTP endpoints within your server. Whenever registered activity occurs, an HTTP request is issued from OpenTok infrastructure to your endpoint. To register a callback, visit your TokBox account page.

The archive callback URL is set separately from the the callback URL for session events. Set the archive callback URL in the Archive section of your TokBox account page.

Important: If within 30 minutes there are more than 50 event delivery failures (in which we don't receive a 200 success response when sending an HTTP request to your callback URL), we will disable session monitoring event forwarding. We will send an email if this occurs. You can reenable session monitoring in your TokBox account page.

Monitoring connection activity

Once properly registered, OpenTok infrastructure can send HTTP requests for all connections made (and destroyed) to all sessions for a single project. This is particularly useful for tracking user availability without requiring additional connections or reporting directly from the endpoint. For more information on monitoring connection activity, visit the callback reference for connection events.

Monitoring streams

Server endpoints can also register to receive HTTP requests triggered by stream activity on all sessions for a given project. When streams are created and destroyed, the request will contain stream and connection data for the stream that triggered the event. For more information on monitoring stream activity, visit the callback reference for stream events.

Monitoring archives

Each archive goes through multiple states through the lifespan of the archive. For every status update that occurs, a server endpoint with an archive status registration will receive an HTTP request. This is particularly useful for triggering post-processing of an archive, or for performing any necessary administrative tasks after an archive has been uploaded to persistent storage. For more information on monitoring archive status updates, visit the callback reference for archive events.