How to invite many users to join a room or space

If you want to invite a large number of users into rooms or a space, the fastest way to do that is to prepare a list with all D-PHYS usernames in the following format:

You can then copy paste that list into the invite field.

If you want to generate such a Matrix ID userlist based on an LDAP group (groupshare), you can use the following command on any D-PHYS managed Linux workstation (for example

members <groupname> | sed "s,\ ,\n,g" | awk '{print "@" $1 ""}'

Juste replace groupname with the LDAP group

How to generate a member list from an existing room

To do this you need to use the Client-Server API using an access_token. Please see How to use the Client-Server API on how to obtain an access token.

Then you need the room ID. Go to Room settings > Advanced > Internal Room ID:

Now using curl, your access token and the room ID, we can query the HTTP API to get our member list:

curl -s -X GET -H "Authorization: Bearer ${token}" '!' | grep state_key | grep -oE '@[^:]+:[^"]+'