Engagement Messenger, Exception

Anagha5
Tera Contributor

Hello,

 

Requirement: I'm trying to implement Embedded Messenger feature for one of our client.  I've configured the module, copied the "Embed Code" in my third party website page (which I've considered as another ServiceNow instance for a testing purpose). So, the Embedded Messenger from instance A started to appear on my portal page of instance B. 

 

DOMException: However, some features are not working and it gives me an exception as, 

Uncaught DOMException: Blocked a frame with origin "https://instanceA.service-now.com" from accessing a cross-origin frame. 

Anagha5_0-1698402155337.png

 

Findings: The error seems to be appearing due to a restriction since we're calling the cross origin resource. 

The window.postMessage() method provides a controlled mechanism to securely circumvent this restriction. 

 

Question: But, I'm uncertain on how can I use this postMessage function in my below code used to embed an engagement messenger. Can someone please help around this. 

 

Anagha5_1-1698402777875.png

 

 

1 REPLY 1

Community Alums
Not applicable

Have you created cors rules and http headers?