2023-11-28 16:51:46 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
rel_path="$(dirname "$0")"
|
2024-01-08 16:56:56 +01:00
|
|
|
access_token="$(cat $rel_path/./matrix_access_token.txt)"
|
2023-11-28 16:51:46 +01:00
|
|
|
|
|
|
|
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)"' }'
|