Hi Jun King,
Thank you for your question,
You have correctly described the example code for running three bot instances - if you use three different configuration files.
However, it is strongly advised that you do not use the same private/public key pair across three bot instances for three different organisations using Symphony - as this would pose a potential security issue from an authentication point of view. It would be better suited to have three seprate private/public key pair set up for each organisation's Symphony Pod environment to avoid any conflict with the authentication and potential security issues.
You should use unique private/public key pair with individual Symphony Service Account to manage the authentication process for each of the Symphony Pod environment - this will ensure each authentication session for the Service Account is strictly between the bot application and the organisation's Symphony Pod environment.
To better understand the respective Bot Permissions & Entitlements - you will find the specific roles described here:
https://docs.developers.symphony.com/building-bots-on-symphony/configuration/bot-permissions
The scale of the precise permission will depends on the organisation & their Symphony Pod Administrator and whether they will permit the necessary permissions for the bot to carry out the planned function in the ways you have described.
On the Symphony REST API documentation - it states precisely what is the required bot permission needed for the Service Account to execute the request successfully.
- To search for users by email address or Symphony User ID (https://developers.symphony.com/restapi/reference/find-users)
- For the chat bot to manage the chat room creation (https://developers.symphony.com/restapi/reference/create-im-or-mim) & adding users (https://developers.symphony.com/restapi/reference/add-member)
- To search for all chat room conversations that the calling bot Service Account is a member of (https://developers.symphony.com/restapi/reference/list-user-streams)
- To search for messages (https://developers.symphony.com/restapi/reference/messages-v4) - you will need to have the MessageID to precisely obtain the messages individually.
Please let me know if you have any additional questions.
Kind regards
Wow - that's really a detailed explanation! Thank you for sharing the recommended approach here. All is good.