All tools / Commands

authorizing_integration_owners explainer

Explain an interaction's authorizing_integration_owners map: guild install versus the user who authorized a user install.

Keys are strings

The map's keys are installation contexts that actually authorized this interaction. Key "0" (GUILD_INSTALL) is the guild id when the interaction came from a server, and the string "0" when it came from a DM with the bot. Key "1" (USER_INSTALL) is the id of the user who installed the app, which can differ from the user who clicked a component. A key is present only when the app is installed in that context, the interaction context supports it, and (for commands) the command's integration_types includes it.

Related: Installation and interaction context planner · Interaction response type picker