Skip to main content

app_context_changed event

The context changed while an app was visible

Facts

Required Scopes
Compatible APIs

Usage info

This example includes both the event wrapper and the event structure for the app_context_changed event.

{
"token": "XXYYZZ",
"team_id": "T123ABC456",
"api_app_id": "A123ABC456",
"event": {
"type": "app_context_changed",
"context": {
"entities": [
{
"type": "slack#/types/channel_id",
"value": "C01234ABDCE",
"team_id": "T0ABCDE6543"
}
]
}
},
"type": "event_callback",
"authorizations": [
{
"team_id": "T123ABC456",
"user_id": "U123ABC456",
"is_bot": false,
"is_enterprise_install": false,
}
],
"event_id": "Ev123ABC456",
"event_time": 123456789
}

The app_context_changed event provides information on what the user is currently viewing via the context property, and the entities are ordered by relevance. If no entities are present, the app_context_changed event will provide an empty context object ("context": {}). The agent_view feature must be enabled in order to receive this event.