简体   繁体   English

Twilio ChatApp - 当 OnConversationAdded webhook 触发到我的 ngrok url 时,post webhook 不会添加我

[英]Twilio ChatApp - post webhook is not adding me when OnConversationAdded webhook fires off to my ngrok url

The title says it all.标题说明了一切。 My goal is for a User to send an SMS to my Twilio Number and to be able to Chat back via ChatApp.我的目标是让用户向我的 Twilio 号码发送短信,并能够通过 ChatApp 进行回复。

I'm using the Twilio ChatApp from Codesource and Ngrok reserved domain.我正在使用来自 Codesource 和 Ngrok 保留域的 Twilio ChatApp。 My tunnel is working and Twilio log shows Status was received but it seems like my webhook isn't firing off to add me to the conversation.我的隧道正在工作,Twilio 日志显示已收到状态,但似乎我的 webhook 没有触发将我添加到对话中。 I know the code is correct because its straight from Codesandbox.我知道代码是正确的,因为它直接来自 Codesandbox。

When I do a terminal twilio-cli command to Create Participant (ident) with Chat Service SID that was created upon incoming text, the ChatApp works fine and I'm added in.当我执行终端 twilio-cli 命令以使用根据传入文本创建的聊天服务 SID 创建参与者 (ident) 时,ChatApp 工作正常并且我被添加进来。

Any thoughts?有什么想法吗?

Thanks!谢谢!

Having just come up with this myself, I believe that this Twilio webhook only fires in response to a 200 of onConversationAdd, not all conversations, as you may assume.我自己刚刚提出这个问题,我相信这个 Twilio webhook 只会响应 200 个 onConversationAdd 而不是所有对话,正如您所假设的那样。

This in turn is only called as part of auto-creation.这反过来仅作为自动创建的一部分被调用。

Therefore, check that auto-creation is enabled, but also that the phone number isn't already part of a conversation, else it won't go into auto-creation too.因此,请检查是否启用了自动创建,而且电话号码还不是对话的一部分,否则它也不会进入自动创建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM