Synapse: Add script to generate registration token
This commit is contained in:
parent
c279464c4f
commit
1cded9ae76
1 changed files with 9 additions and 0 deletions
9
synapse/generate_registration_token.sh
Executable file
9
synapse/generate_registration_token.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
rel_path="$(dirname "$0")"
|
||||
access_token="$(cat $rel_path/../matrix_access_token.txt)"
|
||||
|
||||
curl --header "Authorization: Bearer $access_token" \
|
||||
-H "Content-Type: application/json" -w "\n" \
|
||||
-X POST http://localhost:8008/_synapse/admin/v1/registration_tokens/new \
|
||||
-d '{ "uses_allowed": 1, "expiry_time": '"$(date +%s000 -d tomorrow)"' }'
|
Loading…
Reference in a new issue