OnCallerClient
Last updated
Was this helpful?
Last updated
Was this helpful?
Represents a OnCaller client. The first step in using OnCaller Javascript SDK is to initialize a OnCallerClient instance by calling the OnCallerClient() constructor. Then connects to OnCaller server by calling connect, pass in the access token. To generate access token, please follow this link:
You can use our latest SDK version at:
OnCallerClient()
Creates a new OnCallerClient instance.
Properties
Description
accessToken
The access token generated by API
Method
Description
connect(accessToken)
Connects to OnCaller server, using provided access token.
disconnect()
Disconnects from OnCaller server.
sendCustomMessage(userId, data, callback)
Sends any data to other clients.
- userId
: String
- data
: Object
Event Name
Descriptions
connect
On connect to server
authen
On Authentication to server
disconnect
Disconnects from OnCaller server.
custommessage
On receive custom message from server
messagefromtopic