---
title: "{msgid}"
description: The id of the chat message that triggered the command.
---

```text
{msgid}
```

**Platforms:** Twitch and Kick - the message id of whichever platform the command was typed in.

The unique id the platform (Twitch or Kick) gives the message that ran
the command. Mostly useful
for [`{urlfetch:}`](/chat-bot/variables/urlfetch) integrations that want
to correlate a request with the exact chat line, or to make a URL unique
per use.

## Example

```text
!ticket  →  {urlfetch:https://example.com/ticket?user={queryescape:{user}}&ref={msgid}}
```

## Notes

- Commands only. Timers and announcements have no triggering message.
- Works on both platforms - it's a Twitch message id in Twitch chat and a
  Kick message id in Kick chat.
