Websocket Token-API
Overview
Websocket Token-API serves to connect external systems and is an alternative to webhooks.
Addresses to connect to:
-
/ws/token/v1/:TOKEN, where:TOKENis the value of the entity’stoken_localfield integration_point. -
/ws/token/v1passing the header "Authorization: Bearer TOKEN", whereTOKENis the value of thetoken_localfield of the entity integration_point.
Requires websocket connections to be configured to specific APIs available to external systems and corresponding to the connection point by configured roles (opts.filter_capabilities field of the entity integration_point).
Connection information
[
"connection_info",
{
"qid":930293482233
}
]
[
"connection_info_result",
{
"qid":123,
"result":"ok",
"site":"main_site",
"ownertype":"token",
"domain":"test.rootdomain.ru",
"sessionid":"6a0c530c-017d-960e-e3d6-7cd30a921f58",
"connectionid":"b26c45b1-017d-960e-e3d5-7cd30a921f58",
"capabilities":["test","callrecord","ccs","ivrapi","rest","svcscript"],
"datetime":"2021-12-07T18:47:00.003Z",
"timestamp":1638902820003,
"integration_point_id":"c75f0231-016b-8f20-af65-1c1b0d69174c",
"integration_point_type":"public",
"roles":["admin"],
"token":"a55c54b59ee6c8cfab2f83e33c2474d3"
}
]
Affordable Token-API
-
rest - management of system classes (static and dynamic).
-
dmsbatch - batch execution of REST requests to a dynamic class.
-
dmsquery - execution of an arbitrary read request.
-
subscr - subscribing to system events sent by the role wssubscr.
-
ivrapi - external management of IVR scripts.
-
ccs - access to call and device management features.
-
callrecord - access to call records.
-
svcscript - launching the handler of an arbitrary service scenario in the domain.
-
msg - sending arbitrary messages to websocket connections from scripts by the server.
Plug-ins implementing other arbitrary Token-APIs and the corresponding capabilities.