Skip to main content


The $jsapi built-in service includes various system methods.


Common methods

bindThis method is used for setting up handlers.
chatHistoryThe method returns the dialog history of the current session in a simplified format.
chatHistoryJsonThe method returns the detailed dialog history of the current session in the JSON format.
contextThis method returns an object which represents the current request context.
randomThis method returns a random integer number in the specified range.
resolvePathThis method converts relative state paths to absolute ones.
versionThe method returns metadata about the current version of Tovie Platform.

Current time retrieval methods

currentTimeThis method returns the current Unix time in the UTC time zone.
dateForZoneThis method returns the current date and time in the specified format.
timeForZoneThis method returns the current Unix time in the specified time zone.

Session control methods

startSessionThis method starts a new session.
stopSessionThis method stops the current session.
newSessionDeprecated This method creates a new session and passes parameters to it.