QR Code Scanner API¶
Introduction¶
Cloud Softphone functionality can be extended by custom web browser tabs, which can implement various functionality like access to account admin area, service configuration, credit top-up, access to company intranet etc.
In case some user input is needed, it may be more convenient to ask the user to scan a qr-code rather than having him re-type the information. Cloud Softphone app exposes simple javascript API to invoke the QR code scanner from within the embedded browser page and receive the result.
API¶
function onQrCodeReceived(qrValue)
{
alert(qrValue);
}
softphone.openQrCodeScanner(onQrCodeReceived)
The QR scanner is invoked by calling softphone.openQrCodeScanner. The function takes single argument - callback which receives the content of scanned QR code.
Example¶
A simple example of invoking the QR scanner is shown at