# Embed Chat Problems On Mobile

**URL:** <https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922>\
**Category:** API\
**Created:** [April 8, 2017, 12:15am UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922 "2017-04-08T00:15:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshDunnDev](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/joshdunndev/32/5409_2.png) [@JoshDunnDev](https://discuss.dev.twitch.com/u/JoshDunnDev)\
**Post date:** [April 8, 2017, 12:15am UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/1 "2017-04-08T00:15:28Z")

</div>

I am having an issue with the embedded chat now trying to launch the application instead of showing the chat. Is there a way to disable this? This was not happening before and I don’t see any documentation about it. Anyone have an idea on how to solve this?

 ![](https://d2opxh93rbxzdn.cloudfront.net/original/2X/3/388437c3e062a9e01929770b81f68cb69eebc2d2.png)

---

<div class="post-metadata">

**Author:** ![matt\_thomas](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/matt_thomas/32/710_2.png) [@matt\_thomas](https://discuss.dev.twitch.com/u/matt_thomas)\
**Post date:** [April 8, 2017, 12:41am UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/2 "2017-04-08T00:41:10Z")

</div>

Have you tried using a desktop HTTP\_USER\_AGENT to make the request? Or maybe use/make a custom websocket client.

---

<div class="post-metadata">

**Author:** ![moocat](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/moocat/32/116_2.png) [@moocat](https://discuss.dev.twitch.com/u/moocat)\
**Post date:** [April 8, 2017, 4:14am UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/3 "2017-04-08T04:14:27Z")

</div>

My users are having the same problem. Can replicate it myself on iPhone.

> [@matt\_thomas](#):
>
> Have you tried using a desktop HTTP\_USER\_AGENT to make the request? Or maybe use/make a custom websocket client.

That doesn’t make any sense. This is with the chat embed that Twitch provides.

---

<div class="post-metadata">

**Author:** ![JoshDunnDev](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/joshdunndev/32/5409_2.png) [@JoshDunnDev](https://discuss.dev.twitch.com/u/JoshDunnDev)\
**Post date:** [April 8, 2017, 5:44am UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/4 "2017-04-08T05:44:09Z")

</div>

I think this was just changed. I noticed they added Mobile Deep Links to the API so I am wondering if this has something to do with that. I cannot image that this was an intentional change to the mobile embed. Why have the option to embed if they just want to redirect your back to Twitch.

We need to find a way to force the URL to think it’s a desktop, but the problem with that is, since it is an embed code, the redirect happens on Twitch’s end based on the window width. I am not sure if there is anything we can do about that.

---

<div class="post-metadata">

**Author:** ![3ventic](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://discuss.dev.twitch.com/u/3ventic)\
**Post date:** [April 8, 2017, 12:01pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/5 "2017-04-08T12:01:27Z")

</div>

`https://www.twitch.tv/channelname/chat?no-mobile-redirect=true` like the “Switch to Desktop Mode” uses.

---

<div class="post-metadata">

**Author:** ![matt\_thomas](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/matt_thomas/32/710_2.png) [@matt\_thomas](https://discuss.dev.twitch.com/u/matt_thomas)\
**Post date:** [April 8, 2017, 12:20pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/6 "2017-04-08T12:20:42Z")

</div>

> [@moocat](#):
>
> That doesn’t make any sense. This is with the chat embed that Twitch provides.

I don’t understand how it doesn’t make sense. - You are embedding/rending a web page/web content, why couldn’t you add a user\_agent?

If I change my useragent on chrome on my desktop to:

`Mozilla/5.0 (Linux; Android 7.1.1; Pixel XL Build/NOF27B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.132 Mobile Safari/537.36`

Which is what my phone uses by default - I get redirected by the webserver from the request:  
[Twitch](https://twitch.tv/:CHANNEL/chat) - to - [Twitch](https://m.twitch.tv/:CHANNEL/chat?desktop-redirect=true)

of course this was my suggestion before I was reminded about the no-mobile-redirect=true option above. That’s clearly the better solution.

> [@3ventic](#):
>
> [Twitch](https://www.twitch.tv/channelname/chat?no-mobile-redirect=true) like the “Switch to Desktop Mode” uses.

Forgot that existed, Much easier solution!

---

<div class="post-metadata">

**Author:** ![3ventic](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://discuss.dev.twitch.com/u/3ventic)\
**Post date:** [April 8, 2017, 12:32pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/7 "2017-04-08T12:32:09Z")

</div>

Web applications that run in the browser (as opposed to an app installed on the phone) don’t have the option to customize user-agent.

---

<div class="post-metadata">

**Author:** ![matt\_thomas](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/matt_thomas/32/710_2.png) [@matt\_thomas](https://discuss.dev.twitch.com/u/matt_thomas)\
**Post date:** [April 8, 2017, 1:00pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/8 "2017-04-08T13:00:25Z")

</div>

Ok, so I was incorrectly assuming it was app installed on the phone, Thanks for the clarification.

---

<div class="post-metadata">

**Author:** ![3ventic](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://discuss.dev.twitch.com/u/3ventic)\
**Post date:** [April 8, 2017, 1:03pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/9 "2017-04-08T13:03:27Z")

</div>

I don’t know which it is, just pointing out it won’t work for everyone who comes across this thread.

---

<div class="post-metadata">

**Author:** ![moocat](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/moocat/32/116_2.png) [@moocat](https://discuss.dev.twitch.com/u/moocat)\
**Post date:** [April 8, 2017, 1:04pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/10 "2017-04-08T13:04:08Z")

</div>

> [@3ventic](#):
>
> `https://www.twitch.tv/channelname/chat?no-mobile-redirect=true`

I guess that’s one way to get around it, but it’s a hacky method and may change at any point.  
This shouldn’t be happening at all when using an embed.

---

<div class="post-metadata">

**Author:** ![3ventic](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://discuss.dev.twitch.com/u/3ventic)\
**Post date:** [April 8, 2017, 1:09pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/11 "2017-04-08T13:09:03Z")

</div>

Maybe we could get a non-redirecting URL officially supported and documented @DallasNChains

---

<div class="post-metadata">

**Author:** ![JoshDunnDev](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/joshdunndev/32/5409_2.png) [@JoshDunnDev](https://discuss.dev.twitch.com/u/JoshDunnDev)\
**Post date:** [April 8, 2017, 8:01pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/12 "2017-04-08T20:01:26Z")

</div>

> [@moocat](#):
>
> ?no-mobile-redirect=true

This works for now. It will at least make it functional again. I appreciate the help!

---

<div class="post-metadata">

**Author:** ![moocat](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/moocat/32/116_2.png) [@moocat](https://discuss.dev.twitch.com/u/moocat)\
**Post date:** [April 15, 2017, 3:39pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/13 "2017-04-15T15:39:45Z")

</div>

@DallasNChains any word on this?

---

<div class="post-metadata">

**Author:** ![DallasNChains](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dallasnchains/32/1608_2.png) [@DallasNChains](https://discuss.dev.twitch.com/u/DallasNChains)\
**Post date:** [April 17, 2017, 5:03pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/14 "2017-04-17T17:03:21Z")

</div>

I talked to the engineer about this a while ago, and it should be good. Let me know if you’re still seeing the redirect behavior.

---

<div class="post-metadata">

**Author:** ![moocat](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/moocat/32/116_2.png) [@moocat](https://discuss.dev.twitch.com/u/moocat)\
**Post date:** [April 24, 2017, 11:56pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/15 "2017-04-24T23:56:57Z")

</div>

@DallasNChains Yeah, still the case. Showing exactly what is in OP, with no way to show the chat.

---

<div class="post-metadata">

**Author:** ![DallasNChains](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dallasnchains/32/1608_2.png) [@DallasNChains](https://discuss.dev.twitch.com/u/DallasNChains)\
**Post date:** [April 26, 2017, 6:35pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/16 "2017-04-26T18:35:53Z")

</div>

@moocat Do you have a public website where I can look at this? Every site I’ve tested doesn’t exhibit this behavior, so I’m curious what is triggering this. I’m on an iPhone. Are you Android by chance?

---

<div class="post-metadata">

**Author:** ![matt\_thomas](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/matt_thomas/32/710_2.png) [@matt\_thomas](https://discuss.dev.twitch.com/u/matt_thomas)\
**Post date:** [April 26, 2017, 8:37pm UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/17 "2017-04-26T20:37:20Z")

</div>

Just tested on my Android without enabling desktop mode and it redirected me to the page with ?no-mobile-redirect=true

Full chat loaded without redirect to app. Works for me. Thanks.

---

<div class="post-metadata">

**Author:** ![moocat](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/moocat/32/116_2.png) [@moocat](https://discuss.dev.twitch.com/u/moocat)\
**Post date:** [April 27, 2017, 1:02am UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/18 "2017-04-27T01:02:22Z")

</div>

> [@DallasNChains](#):
>
> @moocat Do you have a public website where I can look at this? Every site I’ve tested doesn’t exhibit this behavior, so I’m curious what is triggering this. I’m on an iPhone. Are you Android by chance?

@DallasNChains [http://twitch.moobot.tv/r/chat#moobot](http://twitch.moobot.tv/r/chat#moobot)  
Keep in mind that I’m using an account that haven’t dismissed any of those overlays.  
Also on iPhone.

---

<div class="post-metadata">

**Author:** ![DallasNChains](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dallasnchains/32/1608_2.png) [@DallasNChains](https://discuss.dev.twitch.com/u/DallasNChains)\
**Post date:** [April 27, 2017, 4:47am UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/19 "2017-04-27T04:47:12Z")

</div>

@moocat Ah. I can repro this on your site. It’s due to the URL you’re using: [http://twitch.tv/chat/embed?channel=moobot&popout\_chat=true](http://twitch.tv/chat/embed?channel=moobot&popout_chat=true). The [documented chat embed](https://dev.twitch.tv/docs/v5/guides/embed-chat/) is [http://www.twitch.tv/:channel/chat](http://www.twitch.tv/:channel/chat). If you switch to that, you shouldn’t have this issue. 🙂

---

<div class="post-metadata">

**Author:** ![moocat](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/moocat/32/116_2.png) [@moocat](https://discuss.dev.twitch.com/u/moocat)\
**Post date:** [April 27, 2017, 5:18am UTC](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922/20 "2017-04-27T05:18:36Z")

</div>

@DallasNChains Aha, thanks!

[Next page](https://discuss.dev.twitch.com/t/embed-chat-problems-on-mobile/9922.md?page=2)
