# Mobile chat replay

**URL:** <https://staging-discuss.dev.twitch.com/t/mobile-chat-replay/10762>\
**Category:** API\
**Created:** [June 20, 2017, 3:48am UTC](https://staging-discuss.dev.twitch.com/t/mobile-chat-replay/10762 "2017-06-20T03:48:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadowsstory](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@shadowsstory](https://staging-discuss.dev.twitch.com/u/shadowsstory)\
**Post date:** [June 20, 2017, 3:48am UTC](https://staging-discuss.dev.twitch.com/t/mobile-chat-replay/10762/1 "2017-06-20T03:48:27Z")

</div>

Hey everyone,  
I see chat replay is now on the mobile web channel pages. I was wondering if there was an embed for that yet or not. I’m attempting to make a twitch mobile web replica with AngularJS and thought it’d be cool to add that in.

Thanks! =)

---

<div class="post-metadata">

**Author:** ![Alca](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/alca/32/2783_2.png) [@Alca](https://staging-discuss.dev.twitch.com/u/Alca)\
**Post date:** [June 20, 2017, 7:33am UTC](https://staging-discuss.dev.twitch.com/t/mobile-chat-replay/10762/2 "2017-06-20T07:33:59Z")

</div>

There is no available embed. You just have to do it yourself.

The information comes from this unsupported API endpoint:

> `https://rechat.twitch.tv/rechat-messages`

# Options

You pass a `video_id` (a prepended “v” is required) and one of these two:

## start

A time stamp in seconds. If you send something before or after valid time stamps for the video, you will get an error. Use increments of 30 seconds.

## offset\_seconds

An offset in seconds. This is similar to `start` in that it’s just added to the actual start value internally. Use increments of 30 seconds.

# Output

## Success

#### Without any useful data

```javascript
{
	"data": []
}

```

#### With a regular chat line

```javascript
{
	"data": [
		{
			"type": "rechat-message",
			"id": "chat-23-2017:AVyGk02p3SgXF2ZqXqdl",
			"attributes": {
				"command": "",
				"room": "piggsty",
				"timestamp": 1496906404791, // milliseconds
				"video-offset": 300791, // milliseconds
				"deleted": false,
				"message": "----",
				"from": "alca",
				"color": "#187DE3",
				"tags": {
					"badges": "moderator/1,turbo/1",
					"color": "#187DE3",
					"display-name": "Alca",
					"emotes": null,
					"id": "05fb4966-b1c4-47c2-a3fb-74858db0d71a",
					"mod": true,
					"room-id": "36993713",
					"sent-ts": "1496906419217",
					"subscriber": false,
					"tmi-sent-ts": "1496906419226",
					"turbo": true,
					"user-id": "7676884",
					"user-type": "mod"
				}
			},
			"links": {
				"self": "/rechat-message/chat-23-2017:AVyGk02p3SgXF2ZqXqdl"
			}
		},
	],
	"meta": {
		"next": null
	}
}

```

Use `timestamp` and/or `video-offset` in the attributes to know when the message should appear with the video.

I suppose it’s possible for there to be more than just a “`rechat-message`” chat line but I haven’t necessarily found one in just playing with it. As well as “`command`s.”

## Error

#### Invalid or missing video ID

```javascript
{
	"errors": [
		{
			"status": 400,
			"detail": "Invalid Video ID"
		}
	]
}

```

#### Out of range start time

```javascript
{
	"errors": [
		{
			"status": 400,
			"detail": "0 is not between 1497029898 and 1497051187"
		}
	]
}

```

---

<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:** [July 20, 2017, 7:40am UTC](https://staging-discuss.dev.twitch.com/t/mobile-chat-replay/10762/3 "2017-07-20T07:40:12Z")

</div>

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