# How to send a chat message to twitch?

**URL:** <https://staging-discuss.dev.twitch.com/t/how-to-send-a-chat-message-to-twitch/18801>\
**Category:** API\
**Created:** [November 26, 2018, 10:03am UTC](https://staging-discuss.dev.twitch.com/t/how-to-send-a-chat-message-to-twitch/18801 "2018-11-26T10:03:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peng\_Wang](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@Peng\_Wang](https://staging-discuss.dev.twitch.com/u/Peng_Wang)\
**Post date:** [November 26, 2018, 10:03am UTC](https://staging-discuss.dev.twitch.com/t/how-to-send-a-chat-message-to-twitch/18801/1 "2018-11-26T10:03:06Z")

</div>

Is there a way to send a chat message to certain channel without using embed chat or irc?  
I develop a android app and want to send chat message from my app to twitch  
I try to embed chat using official embed [official](https://dev.twitch.tv/docs/embed/chat/), I loading the chat html with webview, but it seems impossible to login.

I try to find a irc library but there seems to be no suitable one.

so, is there a simple way to send a chat message to certain channel ?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [November 26, 2018, 7:47pm UTC](https://staging-discuss.dev.twitch.com/t/how-to-send-a-chat-message-to-twitch/18801/2 "2018-11-26T19:47:33Z")

</div>

The documentation at

> **[Embedding Twitch](https://dev.twitch.tv/docs/embed/)**
>
> Embedding Twitch in Your Website

Covers how to embed chat

And the documentation at

> **[Chat & Chatbots](https://dev.twitch.tv/docs/irc/)**
>
> Twitch Chat & Chatbots

Covers IRC connectivity documentation

---

<div class="post-metadata">

**Author:** ![Peng\_Wang](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@Peng\_Wang](https://staging-discuss.dev.twitch.com/u/Peng_Wang)\
**Post date:** [November 28, 2018, 2:51am UTC](https://staging-discuss.dev.twitch.com/t/how-to-send-a-chat-message-to-twitch/18801/3 "2018-11-28T02:51:21Z")

</div>

I don’t know IRC very well and I have a question.  
If i want to know the chat room settings(e.g. followers-only / subs-only) , what should I send to the server? I read the documentation at [offical irc document](https://dev.twitch.tv/docs/irc/guide/#twitch-irc-capabilities) and It confuses me. Like below：

 ![chatdoc](https://d2spem0quai2ol.cloudfront.net/original/2X/b/bbda56698042fc911e8b2773b4d0fccde3e43825.png)  
It’s mean that I should send the below msg to check whether the chat room is subs-only?

> CAP REQ :twitch.tv/ROOMSTATE(subs-only)

---

<div class="post-metadata">

**Author:** ![3ventic](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://staging-discuss.dev.twitch.com/u/3ventic)\
**Post date:** [November 28, 2018, 2:31pm UTC](https://staging-discuss.dev.twitch.com/t/how-to-send-a-chat-message-to-twitch/18801/4 "2018-11-28T14:31:15Z")

</div>

Your application tells the IRC server which capabilities it supports. You’ll need `twitch.tv/tags` (enables the additional data on commands) and `twitch.tv/commands` (Twitch’s set of custom commands).

You can enable these capabilities using CAP REQ:

> `CAP REQ :twitch.tv/tags twitch.tv/commands`

When you start listening to messages on a channel using `JOIN`, and every time after that chat room settings are changed, you will receive a [`ROOMSTATE`](https://dev.twitch.tv/docs/irc/tags/#roomstate-twitch-tags) message. Parse the information you’re interested in from these messages.

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [December 28, 2018, 2:31pm UTC](https://staging-discuss.dev.twitch.com/t/how-to-send-a-chat-message-to-twitch/18801/5 "2018-12-28T14:31:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
