diff --git a/changelog.d/16330.doc b/changelog.d/16330.doc new file mode 100644 index 000000000000..96088fe0d0c0 --- /dev/null +++ b/changelog.d/16330.doc @@ -0,0 +1 @@ +Adding directions to the Admin section on getting a bearer token for an admin user with cURL. \ No newline at end of file diff --git a/changelog.d/16334.doc b/changelog.d/16334.doc new file mode 100644 index 000000000000..96088fe0d0c0 --- /dev/null +++ b/changelog.d/16334.doc @@ -0,0 +1 @@ +Adding directions to the Admin section on getting a bearer token for an admin user with cURL. \ No newline at end of file diff --git a/docs/usage/administration/admin_api/README.md b/docs/usage/administration/admin_api/README.md index 7c85bf751b04..f2e28e35efe6 100644 --- a/docs/usage/administration/admin_api/README.md +++ b/docs/usage/administration/admin_api/README.md @@ -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":"", "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