#
Click to Dial
In
#
Usage
Populate the dialler input when a user clicks an enabled phone number..
#
Syntax
webclient.clickToDial(payload: Object): Promise
#
Arguments
#
Sample Javascript
import IpscapeWebClient from '@ipscape/web-client';
// Create a new instance of the IpSCAPE Web Client
const webClient = new IpscapeWebClient();
const clickToDialLink = document.querySelector('#clickToDialLink');
clickToDialLink.addEventListener('click', (event) => {
event.preventDefault();
webclient.clickToDial({ number: event.target.innerText }).then((eventData) => {
console.log('clickToDial: complete', eventData);
});
});
#
Response
This method returns a promise. The resolved response is returned in an object and contains the following:
Result
Example
success
Response
Returns this object if the API method call was invoked successfully, false otherwise.
{
success: boolean;
result: {
message: string;
timestamp: number;
}
}