Allow API Integration to create polls in subgroups
I'm using the create poll endpoint to create proposals through the API. It has a parameter "discussion_id" which allows the caller to create a new poll on an existing discussion thread. My Loomio group has subgroups, and I would like to have an API Key with sufficient scopes to create proposals on discussion threads within subgroups.
Currently, in order to do that you need to use an API Key that was created specifically for the subgroup (because of this code which sets the group_id based on the API key, leading to this check failing if the discussion_id is in a subgroup). So, my bot would need to manage several API keys–– one for each subgroup––, which is not ideal. Would you consider allowing the integrations of the "parent" group to be able to manage all subgroups? For my use case, I'd also like to be receive webhook events from all subgroups via a single integration.