From d07f6856fecde7d0e397d8dc614c697d24dd2d40 Mon Sep 17 00:00:00 2001 From: reivilibre Date: Thu, 5 Jan 2023 18:18:54 +0000 Subject: deploy: 4eb2f4e02b83c90519a8a55c562d1fafab7caf0b --- develop/usage/administration/admin_api/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'develop/usage/administration/admin_api/index.html') diff --git a/develop/usage/administration/admin_api/index.html b/develop/usage/administration/admin_api/index.html index 0d5587271d..62901ed644 100644 --- a/develop/usage/administration/admin_api/index.html +++ b/develop/usage/administration/admin_api/index.html @@ -151,7 +151,7 @@

Many of the API calls in the admin api will require an access_token for a server admin. (Note that a server admin is distinct from a room admin.)

An existing user can be marked as a server admin by updating the database directly.

-

Check your database settings in the configuration file, connect to the correct database using either psql [database name] (if using PostgreSQL) or sqlite3 path/to/your/database.db (if using SQLite) and elevate the user @foo:bar.com to administrator.

+

Check your database settings in the configuration file, connect to the correct database using either psql [database name] (if using PostgreSQL) or sqlite3 path/to/your/database.db (if using SQLite) and elevate the user @foo:bar.com to administrator.

UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
 

A new server admin user can also be created using the register_new_matrix_user @@ -168,10 +168,10 @@ providing the token as either a query parameter or a request header. To add it a

curl --header "Authorization: Bearer <access_token>" <the_rest_of_your_API_request>
 

For example, suppose we want to -query the account of the user +query the account of the user @foo:bar.com. We need an admin access token (e.g. syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk), and we need to know which port -Synapse's client listener is listening +Synapse's client listener is listening on (e.g. 8008). Then we can use the following command to request the account information from the Admin API.

curl --header "Authorization: Bearer syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk" -X GET http://127.0.0.1:8008/_synapse/admin/v2/users/@foo:bar.com
-- 
cgit 1.5.1