This commit is contained in:
Brian 2023-12-28 13:33:22 +00:00 committed by GitHub
commit f26d01037b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

1
changelog.d/16330.doc Normal file
View File

@ -0,0 +1 @@
Adding directions to the Admin section on getting a bearer token for an admin user with cURL.

1
changelog.d/16334.doc Normal file
View File

@ -0,0 +1 @@
Adding directions to the Admin section on getting a bearer token for an admin user with cURL.

View File

@ -18,6 +18,12 @@ already on your `$PATH` depending on how Synapse was installed.
Finding your user's `access_token` is client-dependent, but will usually be shown in the client's settings.
To get an access token from cURL without a client, make a request to `_matrix/client/r0/login` with `type` set to `m.login.password`, `user`, and `password` set to their respective admin account values included in the data field:
```sh
curl -XPOST -d '{"type":"m.login.password", "user":"<admin>", "password":"<password>"}' "http://127.0.0.1:8008/_matrix/client/r0/login"
```
## Making an Admin API request
For security reasons, we [recommend](../../../reverse_proxy.md#synapse-administration-endpoints)
that the Admin API (`/_synapse/admin/...`) should be hidden from public view using a