postmessagezoho

Zoho PostMessage API returns 1108 Domain not registered


I'm using postMessage API to post a save command to my Zoho writer iframe. Following the docs I have this

        XDC.setTarget({
            "origin": "https://api.office-integrator.com",
            "window": document.getElementById("zoho-writer").contentWindow
        });
        XDC.postMessage({
            "message": "SaveDocument",
            "data": {
                "hideSaveButton": true, // Default value will be true
                "forceSave": true, // Default value will be true
                "saveUrlParams": JSON.stringify({ apikey: "<my key>" }),
                "format": "docx"
            },
            // Use "SaveDocumentResponse" event for oncomplete
            "onexception": function(data) {
                var x = 1;
            },
            "oncomplete": function (data) {
                var x = 1;
            }
        } );

I'm just guessing on the saveUrlParams because they don't explain that other then to say it is some JSON. Whenever I run this I get the onexception response with code 1108 and a message of Domain not registered. I have gone in to my Zoho account - the White Labeling - Security Controls - PostMessage domain and added my domain.

Any thoughts?


Solution

  • If you have already configured your domain in White Labeling -> Security Controls -> PostMessage Domain then please check if you have enabled this configuration with toggle button in right top of corner of same page. Refet this screenshot for reference

    By default, this option will be in disabled state. You need to enable this option to make added domains to be effective in post message communication. Please enable this option and try post message api from your web application to office integrator editor iframe.

    Write to Zoho Office Integrator support email address(support@zohoofficeintegrator.com) if you still face any issue with post message configuration.