- See:
Example
liveApi.controller.service.userID = "my.user@example.com";
liveApi.controller.service.tenantID = "MyTenant";
// auth token and expiry are returned during Live Experience Authentication
liveApi.controller.service.authToken = myAuthToken;
// the callback should update the authToken property with the refreshed token
liveApi.controller.service.authRefresh(1200, () => {
myRefreshAuthToken(jwt => {
liveApi.controller.service.authToken = jwt;
});
});
// optional property used if not connecting to the US Live Experience instance:
liveApi.controller.service.address = "https://emea.live.oraclecloud.com";
Members
address :string
Set the cloud server address, like "https://emea.live.oraclecloud.com".
Type:
- string
authToken :string
Set the authentication token (JWT) retrieved from Live Experience auth service.
Type:
- string
kycScanReference :string
Set the kyc scan reference.
Type:
- string
skipRecordingPermissionRequest :boolean
Set the flag to skip the recording permissions request.
Type:
- boolean
startCallDirectly :boolean
Set the flag to start call directly.
Type:
- boolean
tenantID :string
Set the Tenant ID.
Type:
- string
userID :string
Set the UserID (such as the caller's email address).
Type:
- string
Methods
authRefresh(expiry, refresh)
Refresh the auth token after the specified expiry.
The callback function is expected to set the authToken (e.g. controller.service.authToken = token).
The callback is invoked 2 minutes before expiry (if possible) to avoid the token expiring.
Parameters:
Name | Type | Description |
---|---|---|
expiry |
number | token expiry in seconds (minimum: 60 seconds). |
refresh |
function | callback to invoke when the token expires. |
language(lang)
Set the language.
Parameters:
Name | Type | Description |
---|---|---|
lang |
string | the language |
language() → {string}
Get the language value.
Returns:
the language
- Type
- string