未处理的拒绝(MissingRequiredParameter):在参数中缺少必需的键'userId'

时间:2020-02-28 07:25:24

标签: reactjs amazon-lex aws-lex

我正在将React App与AWS Lex Chatbot集成在一起,
我已按照本文档-https://aws-amplify.github.io/docs/js/interactions
中指定的手动流程进行操作 而且每次发送消息时,都会被以下错误消息触发

错误:未处理的拒绝(MissingRequiredParameter):在参数

中缺少必需的键'userId'

有人可以帮我吗...

enter image description here

这是我发送请求的方式

Amplify.configure({
    Auth: {
      identityPoolId: 'us-east-1:xxxx-xxxx',
      region: 'US_EAST_1',

    },
    Interactions: {
        bots: {
            "Chatbot": {
              "name": "Chatbot",
              "alias": "Bot1",
              "region": "US_EAST_1",

            },
          },

    }
  });

组件

 <ChatBot
          title="My Bot"
          theme={myTheme}
          botName="Chatbot"
          welcomeMessage="Welcome, how can I help you today?"
        onComplete={this.handleComplete.bind(this)}
          clearOnComplete={true}
          conversationModeOn={true}
        />

0 个答案:

没有答案
相关问题