curl -sS -X POST 'https://matrix.example.com/_synapse/admin/v1/registration_tokens/new' -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"uses_allowed":10,"expiry_time_ms":2592000000}'

Category: Matrix & Synapse

curl -sS -X POST 'https://matrix.example.com/_synapse/admin/v1/registration_tokens/new' -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"uses_allowed":10,"expiry_time_ms":2592000000}'

Create a registration token

Generates a new token good for 10 registrations that expires after 2592000000 milliseconds (30 days). Share it with people who should self-register; the server returns the full token string in the response. Set uses_allowed to null for unlimited, or omit expiry_time_ms for no expiration. Requires registration_requires_token in the config to take effect.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.