Skip to content
Markus Wallentin edited this page Aug 29, 2019 · 2 revisions

HTML Moment public API

Whenever you launch an HTML moment the backend will inject an API that will allow you to retrieve useful information such as event ID, user ID, authentication token etc - information that is unique for this particular moment or event and can be used for accessing other APIs in the Stagecast platform.

All functions are wrapped in a namespace called stagecast.

See documentation of the Stagecast object here.

Stagecast API

If you have the token as retrieved from the above API is is possible to invoke further methods in the Stagecast API which can be found at http://stagecast.se/api/docs.

In particularly useful for HTML view moments is perhaps the Websocket API that can be used to, in real-time, send messages between clients in a moment or the various methods for persisting moment state - like Get global moment state, Get user moment state, Modify user moment state and Subscribe to state changes