Authorize with multiple bot IDs
See original GitHub issueDescription
When an app is installed on an organization (for use of Admin APIs) incoming events may have the same bot user ID but different bot IDs. Currently, the authorize
callback only allows apps to return a single bot ID as a single string. We could make that type a string | string[] | undefined
and update the ignoreSelf
middleware to iterate over the array to match events that should be ignored.
const app = new App({
authorize: async ({ }) => {
// lookup installations in database ...
return {
userToken: 'xoxp-...',
botToken: 'xoxb-...',
botId: ['B12345', 'B67890'],
botUserId: 'W54321',
};
},
});
Requirements (place an x
in each of the [ ]
)
- I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
- I’ve read and agree to the Code of Conduct.
- I’ve searched for any related issues and avoided creating a duplicate issue.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Add authentication to a bot in Bot Framework SDK - Bot Service
Go to the Azure Bot resource blade for your bot. Go to the bot's Configuration blade. Select Manage, next to Microsoft App ID,...
Read more >Is it possible to use the same EndPoint for several Microsoft Bots
So you want multiple bot identities for the same endpoint. I believe your only option is to implement authentication yourself (check a list...
Read more >Advanced Discord Server Verification Bot - YouTube
... I implemented an advanced authorization bot for Discord Servers. ... to encrypt guild and user ids as well as decrypt encrypted strings....
Read more >Adding your bot to servers - discord.js Guide
client_id=... is to specify which application you want to authorize. You'll need to replace this part with your client's id to create a...
Read more >Getting an id token from the Azure Bot Service when ...
For our proxy we need to implement two API's, in this case we will be wrapping the Azure Active Directory Authentication and Token...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@josh91hickman Thanks for taking the time to make the PR! The following comment may affect your PR. 🙏
@aoberoi I revisited this issue and came to think of the possibility to have another field name
botIds
in the case.To me, returning either of
botId
orbotIds
is more consistent in terms of naming. This means Bolt expectsbotId
for workspace installed apps while it understands the apps is org-level installed one by encounteringbotIds
.Do you believe we should go with
botId
for both?This task is no longer relevant. Let me close it now.