You must enable javascript in order to use the Slack API Documentation. You can do this in your browser settings.
Go to Slack

message.groups event

A message was posted to a private channel

Compatibility: Events API

Expected scopes:

This example appears wrapped in the standard event wrapper used by all events delivered on the Events API.

{
    "token": "one-long-verification-token",
    "team_id": "T061EG9R6",
    "api_app_id": "A0PNCHHK2",
    "event": {
        "type": "message",
        "channel": "G024BE91L",
        "user": "U2147483697",
        "text": "One cannot programmatically detect the difference between `message.mpim` and `message.groups`.",
        "ts": "1355517523.000005",
        "event_ts": "1355517523.000005",
        "channel_type": "group"
    },
    "type": "event_callback",
    "authed_teams": [
        "T061EG9R6"
    ],
    "event_id": "Ev0PV52K21",
    "event_time": 1355517523
}

The semantics for this message event type are similar to the core message event sent through the RTM API. Messages often include many more fields than those shown above.

Differentiate private channels from other message.* events by looking for the event's channel_type field set to "group".

To receive only messages sent to your app, subscribe to app_mention events instead.

Events API compatibility

Subscribe to this event via the Events API.

Events of this type will be wrapped in metadata when sent via the Events API.

Unavailable in the RTM API

This event type is compatible only with the Events API.

When using the RTM API, the Events API's message.channels, message.im, message.mpim, and message.groups event types are presented as simple message events instead.