HI Team,
I am trying to implement co browse for voice, currently i have taken the sample code from developer forum, added co browse under contact center and using the same deployment key, i will attach the code i am using and screenshots of errors, for your reference, please look into it. I have hidden some details in below code,
Simple co-browse with voice example<h1>Simple co-browse with voice example</h1>
<button type="button" id="start-cobrowse" onclick="genesysWebchat.startCobrowse()">Enter Co-browse Security Key</button>
<!-- Div with this id required to display security key form -->
<div id="cobrowse-security-form"></div>
<!-- Co-browse with voice uses the webchat API, so include it here -->
<script src="https://apps.usw2.pure.cloud/webchat/jsapi-v1.js" type="text/javascript"></script>
<!-- For co-browse with voice, you must load the co-browse API. Co-browse with web chat loads the co-browse API for you. -->
<script src="https://cobrowse.usw2.pure.cloud/cobrowse-jsapi-v1.js?deploymentKey="" type="text/javascript"></script>
<script type="text/javascript">
let genesysWebchat = (function() {
function createCobrowseConfig(){
return {
// Web chat application URL. Use the correct top-level domain for your Genesys Cloud region, i.e. apps.mypurecloud.ie, apps.mypurecloud.jp, apps.mypurecloud.co.uk.
"webchatAppUrl": "https://apps.usw2.pure.cloud/webchat",
// Web chat service URL
"webchatServiceUrl": "https://realtime.usw2.pure.cloud:443",
// Numeric organization ID
"orgId": ,
// OrgGuid. Needed for co-browse with voice.
"orgGuid": "",
// Organization name
"orgName": "",
// Log level
"logLevel": "DEBUG",
// Locale code
"locale": "en",
// CSS class applied to the security key window, but not its contents
"cssClass": "webchat-frame",
// Custom style applied to the security key window, but not its contents
"css": {
"width": "100%",
"height": "100%"
},
// Optional CSS for styling security key form
"contentCssUrl": "https://example.com/style.css",
// Element id where the security key form will appear.
"containerEl": "cobrowse-security-form",
// Set to true to display security key form. Do not include for co-browse with web chat or for PureConnect co-browse with voice.
"promptForSecurityKey": true
};
}
return {
startCobrowse: function() {
let config = createCobrowseConfig();
// Can also use callback
ININ.cobrowse.create(config)
.then(function(result) {
// Handle success
})
.catch(function(err) {
// Handle failure
});
}
}
})();
</script>