Last active
June 15, 2020 20:35
-
-
Save lovelaced/d93da14d4b29665a1740aca6bc2328b7 to your computer and use it in GitHub Desktop.
Logging into matrix via curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MATRIX_SERVER="$2" | |
USER="$3" | |
PASSWORD="$4" | |
curl -XGET "https://$MATRIX_SERVER/_matrix/client/r0/login" | |
curl -XPOST -d '{"type":"m.login.password", "user":"$USER", "password":"$PASSWORD}' "https://$MATRIX_SERVER/_matrix/client/r0/login" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment