Manideep_Malkapeta | 2024-04-22 08:52:07 UTC | #1
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,
<html> <head lang="en"> <meta charset="UTF-8"> <title>Simple co-browse with voice example</title> </head> <body>
<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>
</body> </html>
system | 2024-05-23 08:53:04 UTC | #2
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 25852