Bulk adding users to a room

It is possible to bulk add users into a room by using a script. The following script will automate this process via a .csv file of userIDs, plus some configuration of the pod, authentication keys/certificates, Service Account and a RoomID.

Note: This script uses Python, please install this before attempting to run the script.

Note: This is an unsupported script which has been developed for users as a guideline to adapt accordingly.

1. Install the Python SDK file found here.

Note: This file has already been added to this script's Git Repository which is linked at the end of this article.

2. To install it, you will need to save the file as requirements.txt and use the pip command (Figure 1):

mceclip0.png

Figure 1 Command

3. Install the Python SDK with the below command (Figure 2):

mceclip1.png

Figure 2 Command

4. You are required to have the following items which are passed through to the script to ensure it is executed successfully:

  • RSA key pair.

  • config.json.

  • userIDs.csv.

5. The RSA key pair must be obtained from your internal IT team as Symphony do not administer your pod.

6. The config.json is required in the following format (Figure 3):

{
"sessionAuthHost": "companyabc.symphony.com",
"sessionAuthPort": 443,
"keyAuthHost": "companyabc.symphony.com",
"keyAuthPort": 443,
"podHost": "companyabc.symphony.com",
"podPort": 443,
"agentHost": "companyabc.symphony.com",
"agentPort": 443,
"botRSAPath": "PATH",
"botRSAName": "BOT-RSA-NAME",
"botCertPassword": "BOT-PASSWORD",
"botUsername": "BOT-USERNAME",
"botEmailAddress": "BOT-EMAIL",
"appCertPath": "",
"appCertName": "",
"appCertPassword": "",
"proxyURL": "",
"proxyUsername": "",
"proxyPassword": "",
"authTokenRefreshPeriod": "30",
"truststorePath": ""
}

Figure 3 Config.json format

Note: Where companyabc is the name of your pod.

7. For certificate-based authentication, you must swap botRSAPath and botRSAName with botCertPath and botCertName.

Note: You may also need to swap companyabc.symphony.com to companyabc-api.symphony.com for SessionAuthHost and KeyAuthHost.

Note: You may also need to amend the port numbers to reflect their pod configuration.

8. For the userID.csv, the file must be formatted in the following way with the userIDs of each account to be added to the room (Figure 4):

mceclip2.png

Figure 4 User IDs

9. To execute the script, navigate to the directory where the above files have been saved and run the following command (Figure 5):

python add-users-to-room.py --auth "rsa" --config "/path/to/config.json" --csv "/path/to/userIDs.csv" --stream "{streamID}"

Figure 5 Command

Note: The full script can be viewed and downloaded from repository located here.