Zoho PostMessage API 返回 1108 域未注册

问题描述 投票:0回答:1

我正在使用 postMessage API 将保存命令发布到我的 Zoho writer iframe。按照文档我有这个

        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;
            }
        } );

我只是猜测 saveUrlParams 因为他们没有解释其他的,然后说它是一些 JSON。每当我运行此命令时,我都会收到代码 1108 的异常响应和域未注册的消息。我已进入我的 Zoho 帐户 - 白标 - 安全控制 - PostMessage 域并添加我的域。

有什么想法吗?

postmessage zoho
1个回答
0
投票

如果您已经在白标 -> 安全控制 -> PostMessage 域中配置了域,请检查您是否已使用同一页面右上角的切换按钮启用此配置。 重新截图以供参考

默认情况下,此选项处于禁用状态。您需要启用此选项才能使添加的域在消息后通信中有效。请启用此选项并尝试将消息 api 从您的 Web 应用程序发布到 Office 集成器编辑器 iframe。

如果您仍然遇到任何帖子消息配置问题,请写信至 Zoho Office Integrator 支持电子邮件地址([电子邮件受保护])。

© www.soinside.com 2019 - 2024. All rights reserved.