---
title: "bot_message message"
summary: "A message was posted by an integration"
url: "https://docs.slack.dev/reference/events/message/bot_message"
type: "reference"
subtype: "event"
---

Source: https://docs.slack.dev/reference/events/message/bot_message

# bot_message message

### A message was posted by an integration

## Facts

**Required Scopes**

No scopes required!

**Compatible APIs**

[`Events`](https://docs.slack.dev/apis/events-api.md)

[`RTM`](https://docs.slack.dev/legacy/legacy-rtm-api.md)

## Usage info {#usage-info}

This example includes both the [event wrapper](https://docs.slack.dev/apis/events-api.md#callback-field) and the [event structure](https://docs.slack.dev/apis/events-api.md#event-type-structure) for the `bot_message` message subtype event.

```
{    "token": "XXYYZZ",    "team_id": "T123ABC456",    "api_app_id": "A123ABC456",    "event": {        "type": "message",        "subtype": "bot_message",        "ts": "1358877455.000010",        "text": "Pushing is the answer",        "bot_id": "BB12033",        "username": "github",        "icons": {}    },    "type": "event_callback",    "authorizations": [        {            "team_id": "T123ABC456",            "is_bot": false,            "is_enterprise_install": false,        }    ],    "event_id": "Ev123ABC456",    "event_time": 123456789}
```

In [classic Slack apps](https://docs.slack.dev/legacy/legacy-app-migration/migrating-classic-apps.md), the `bot_message` event is sent when a message is sent to a channel by an integration "bot". It is like a normal user message, except it has no associated user. With current Slack apps, also known as granular bot permissions (GBP) apps, you can detect if a message was sent by a bot by the presence of the `bot_id` and `bot_profile` fields in the event payload.

The `bot_id` tells you which bot sent this message. The username and icon to use can be looked up by passing this to [bots.info](https://docs.slack.dev/reference/methods/bots.info.md). Some `bot_message` events also include `username` or `icons` properties. If present, these override the default username or icon for this bot.
