# can you connect to your twitch channel chat in C#?

**URL:** <https://discuss.dev.twitch.com/t/can-you-connect-to-your-twitch-channel-chat-in-c/31607>\
**Category:** Chat and IRC\
**Created:** [May 9, 2021, 12:47pm UTC](https://discuss.dev.twitch.com/t/can-you-connect-to-your-twitch-channel-chat-in-c/31607 "2021-05-09T12:47:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RssFra97](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/rssfra97/32/12095_2.png) [@RssFra97](https://discuss.dev.twitch.com/u/RssFra97)\
**Post date:** [May 9, 2021, 12:47pm UTC](https://discuss.dev.twitch.com/t/can-you-connect-to-your-twitch-channel-chat-in-c/31607/1 "2021-05-09T12:47:05Z")

</div>

Good morning,  
I am trying to develop an [asp.net](http://asp.net) C# app that allows me to get real alerts, see chat and write chat only by connecting via browser from any device without having to enter twitch credentials every time, I need someone for IRLs can you tell me where to find the right documentation?

The app host will be my server for now and AWS or Azure in the future

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [May 9, 2021, 12:48pm UTC](https://discuss.dev.twitch.com/t/can-you-connect-to-your-twitch-channel-chat-in-c/31607/2 "2021-05-09T12:48:34Z")

</div>

Sure

You’ll need to get an oAuth token of type user.

Depending on how you want to handle auth, will depend on what token you use

- [https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-implicit-code-flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-implicit-code-flow) will just work in a desktop top
- [https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-authorization-code-flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-authorization-code-flow) would leak your secret, unless you app connects to your server for key handling

So implicit probably works the best

Chat is documented here [https://dev.twitch.tv/docs/irc](https://dev.twitch.tv/docs/irc)

If you get stuck and you want to go the library route there is likely a C# lib you can use instead

---

<div class="post-metadata">

**Author:** ![RssFra97](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/rssfra97/32/12095_2.png) [@RssFra97](https://discuss.dev.twitch.com/u/RssFra97)\
**Post date:** [May 9, 2021, 1:12pm UTC](https://discuss.dev.twitch.com/t/can-you-connect-to-your-twitch-channel-chat-in-c/31607/3 "2021-05-09T13:12:07Z")

</div>

Ok, thanks in theory the app saves the access data on the server in an encrypted file and reads them by decrypting it, it does not save anything locally on the device

---

<div class="post-metadata">

**Author:** ![RssFra97](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/rssfra97/32/12095_2.png) [@RssFra97](https://discuss.dev.twitch.com/u/RssFra97)\
**Post date:** [May 10, 2021, 7:51am UTC](https://discuss.dev.twitch.com/t/can-you-connect-to-your-twitch-channel-chat-in-c/31607/4 "2021-05-10T07:51:47Z")

</div>

if instead I want to insert the chat via embedding in my [asp.net](http://asp.net) MVC app?  
i tried with iframe, but it gives “connection denied by [twitch.tv](http://twitch.tv)”.

---

<div class="post-metadata">

**Author:** ![RssFra97](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/rssfra97/32/12095_2.png) [@RssFra97](https://discuss.dev.twitch.com/u/RssFra97)\
**Post date:** [May 10, 2021, 8:02am UTC](https://discuss.dev.twitch.com/t/can-you-connect-to-your-twitch-channel-chat-in-c/31607/5 "2021-05-10T08:02:53Z")

</div>

problem solved, wrong URL

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [June 9, 2021, 8:02am UTC](https://discuss.dev.twitch.com/t/can-you-connect-to-your-twitch-channel-chat-in-c/31607/6 "2021-06-09T08:02:59Z")

</div>

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