Initializing a Session object

Before you can connect to a session, you will need to instantiate a session object using any of the client SDKs available.

Important: Please note that your App ID is your API key.

Instantiate a Session object by calling the OT.initSession() method with your App ID and the appropriate session ID:

The OT.initSession() method returns a Session object, through which subsequent API calls take place.

Note that calling the OT.initSession() method does not create a session; it creates a JavaScript Session object, which represents an existing session. You can create a session using the server-side SDK. See Creating a session.

If the user's browser does not support WebRTC, the call to OT.initSession() results in the page displaying a message to the user. To check for WebRTC support and prevent this message from being displayed, you can call the OT.checkSystemRequirements() method before calling OT.initSession():