【问题标题】:Getting 403 error on init call for web messenger from smooch.io从 smooch.io 调用网络信使时出现 403 错误
【发布时间】:2018-08-04 01:19:34
【问题描述】:

Web messenger 在版本 4 之前停止工作,更改了 init,见下文:

Smooch.init({
    appId : '<my appID>',
    embedded: true
}).then(() => {
    Smooch.sendMessage("Hello Bank Assist")
    Smooch.render(document.getElementById('watson'))
});

收到 http 错误 403,有什么想法吗?

【问题讨论】:

    标签: smooch


    【解决方案1】:

    Web Messenger 的第 3 版已于 2017 年夏季弃用,并于 2018 年 7 月初正式停止提供支持。您需要更新到 4.0.0 以上的版本才能继续使用您的集成。安装说明可以在documentation 中找到。从 3.x 版本系列切换时,请参阅 v4.0.0 release notes 了解显着变化。

    您需要在初始化代码中考虑到嵌入式模式的更改。在嵌入式模式下,您现在需要调用 render 以启动 init 逻辑,因此您的代码应如下所示:

    Smooch.init({
        appId : '<my appID>',
        embedded: true
    }).then(() => {
        Smooch.sendMessage("Hello Bank Assist");
    });
    Smooch.render(document.getElementById('watson'));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-04
      • 1970-01-01
      • 1970-01-01
      • 2014-04-12
      • 1970-01-01
      • 1970-01-01
      • 2016-10-27
      • 1970-01-01
      相关资源
      最近更新 更多