Twilio可编程聊天Ruby快速入门。获得401错误

时间:2017-01-28 11:06:37

标签: twilio twilio-api

我正在试用这个回购的Twilio可编程聊天API:https://github.com/TwilioDevEd/ipm-quickstart-ruby

目前正在验证服务器中生成的令牌。

然而,我尝试了在节点中编写的另一个聊天演示,它运行得很好: https://github.com/twilio/twilio-chat-demo-js

我的项目是Ruby。我正在寻找来自Twilio或社区的人的任何见解,他们已经解决了这个问题,并且可以指出我正确的方向来启动和运行应用程序。

1 个答案:

答案 0 :(得分:2)

这是一个难以解决的问题。

客户端期望JWT令牌中的grant hash下的push_credentials_sid键。

这是解决问题的代码:

[folder for domain A/index.php] [folder for domain B/index.php] Configure your domain registration for www.A.com to point to [folder for domain A] Configure your domain registration for www.B.com to point to [folder for domain B]

app.rb