OnCallerClient

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: https://oncaller.asia/docs/#get-my-caller-access-token

You can use our latest SDK version at: https://cdn.oncaller.asia/assets/js/sdk/v1.0/oncaller.latest.sdk.bundle.min.js

Constructors

OnCallerClient()

Creates a new OnCallerClient instance.

Properties

Properties

Description

accessToken

The access token generated by API

Methods

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

Events

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

On message from topic

incomingcall

On incoming call

Last updated

Was this helpful?