How do I connect my app to chat?

Looks like you’re using your app’s client id as username here instead of the bot’s name.