# Ailed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://allchatta.com') does not match the recipient window's origin ('https://callcentre.callanswering.com')

**URL:** <https://forums.rocket.chat/t/ailed-to-execute-postmessage-on-domwindow-the-target-origin-provided-https-allchatta-com-does-not-match-the-recipient-windows-origin-https-callcentre-callanswering-com/6958>\
**Category:** Community Support\
**Created:** [May 14, 2020, 2:58pm UTC](https://forums.rocket.chat/t/ailed-to-execute-postmessage-on-domwindow-the-target-origin-provided-https-allchatta-com-does-not-match-the-recipient-windows-origin-https-callcentre-callanswering-com/6958 "2020-05-14T14:58:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishek](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@abhishek](https://forums.rocket.chat/u/abhishek)\
**Post date:** [May 14, 2020, 2:58pm UTC](https://forums.rocket.chat/t/ailed-to-execute-postmessage-on-domwindow-the-target-origin-provided-https-allchatta-com-does-not-match-the-recipient-windows-origin-https-callcentre-callanswering-com/6958/1 "2020-05-14T14:58:14Z")

</div>

### Description

chat.php:21 Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided does not match the recipient window’s origin

ccess to XMLHttpRequest at ‘[https://allchatta.com/](https://allchatta.com/)’ from origin \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*(https) has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Blocked autofocusing on a form control in a cross-origin subframe.

For the First API call it give logged in response with Authtoken  
When the postmessage API called  
xhr.send(window.parent.postMessage({  
event: ‘login-with-token’,  
loginToken: data.data.authToken  
}, ‘[https://allchatta.com](https://allchatta.com)’)  
);

 ![image](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/3/393dca2d95fbdf72c955a8d9d59bb0bd31b5ba9f.png)  
It is producing error
