Progress: sending messages and being notified when people join the channel

Kelvin Wangonya - Apr 12 '20 - - Dev Community

As I noted last time, I was having a bit of a problem with sending messages:

Apparently, messages sent from the python twilio client don't activate the webhook so I have to do a direct POST request to the API. Doing that returns an empty response for some reason so I'm not yet able to send messages from the terminal. But I'll figure it out.

After doing some digging, I found out that the Content-Type has to be application/x-www-form-urlencoded. I was using the default application/json. I must say though, it's a bit weird that instead of returning an error that the content type was wrong, it just created an empty message thus returning a blank response in body.

Anyway, now that I've fixed that, I'm able to send and receive messages, and be notified when others join the channel.

Alt Text

My user (newtestguy) is logged in on the terminal app on the right. Two other users are using the browser app on the left. Messages are send and received successfully across both platforms.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .