new Twilio.Sync.Client()
Properties:
Name | Type | Description |
---|---|---|
connectionState |
Client#ConnectionState | Contains current service connection state. Valid options are ['connecting', 'connected', 'disconnecting', 'disconnected', 'denied', 'error']. |
Members
-
<readonly> version :String
-
Current version of Sync client.
Type:
- String
Type Definitions
-
ClientOptions
-
These options can be passed to Client constructor
Type:
- Object
Properties:
Name Type Argument Default Description logLevel
String <optional>
'error' The level of logging to enable. Valid options (from strictest to broadest): ['silent', 'error', 'warn', 'info', 'debug', 'trace'] -
ConnectionState
-
Indicates current state of connection between the client and Sync service.
Valid options are as follows:
- 'connecting' - client is offline and connection attempt is in process.
- 'connected' - client is online and ready.
- 'disconnecting' - client is going offline as disconnection is in process.
- 'disconnected' - client is offline and no connection attempt is in process.
- 'denied' - client connection is denied because of invalid JWT access token. User must refresh token in order to proceed.
- 'error' - client connection is in a permanent erroneous state. Client re-initialization is required.
Type:
- String
Events
-
connectionStateChanged
-
Fired when connection state has been changed.
Parameters:
Name Type Description connectionState
Client#ConnectionState Contains current service connection state.