Rate this page:

Client

Client for managing the connection to the Voximplant cloud.

Methods

addEventListener
Copy URL

Registers a handler for the specified event.

One event can have more than one handler; handlers are executed in order of their registration.

Parameters

Returns

  • type:

    void

connect
Copy URL

Connects to the Voximplant Cloud.

Returns a promise that is resolved when the connection is established.

Parameters

Returns

  • type:

    Promise<void>

disconnect
Copy URL

Disconnects from the Voximplant Cloud.

Returns a promise that is resolved when the connection is closed.

Returns

  • type:

    Promise<void>

getInstance
Static
Copy URL

Returns the client instance.

Returns

handlePushNotification
Copy URL

Handles an incoming push notification payload.

Parameters

Returns

  • type:

    void

login
Copy URL

Logs in to the Voximplant Cloud with a password.

Returns a promise that is resolved to a LoginResult object.

Parameters

  • username:

    string

    Username.

  • password:

    string

    Password.

Returns

loginWithAccessToken
Copy URL

Logs in to the Voximplant Cloud with an access token.

Returns a promise that is resolved to a LoginResult object.

Parameters

  • username:

    string

    Username.

  • accessToken:

    string

    Access token.

Returns

loginWithOneTimeKey
Copy URL

Logs in to the Voximplant Cloud with a one-time key.

Returns a promise that is resolved to a LoginResult object.

Parameters

  • username:

    string

    Username.

  • hash:

    string

    One-time key hash.

Returns

refreshTokens
Copy URL

Refreshes login tokens required for Client.loginWithAccessToken.

Returns a promise that is resolved to a LoginTokens object.

Parameters

  • username:

    string

    Username.

  • refreshToken:

    string

    Refresh token.

Returns

registerForPushNotifications
Copy URL

Registers the device for push notifications.

Parameters

Returns

  • type:

    Promise<void>

removeEventListener
Copy URL

Removes a previously registered handler for the specified event.

Parameters

Returns

  • type:

    void

requestOneTimeKey
Copy URL

Generates a one-time login key for the automated login process.

For additional information please see the guide.

Returns a promise that is resolved to the one-time key string.

Parameters

  • username:

    string

    Username.

Returns

  • type:

    Promise<string>

unregisterFromPushNotifications
Copy URL

Unregisters the device from push notifications.

Parameters

Returns

  • type:

    Promise<void>

Props

state
Copy URL

Watchable property that allows getting the current client state and observing its changes.

Rate this page: