README.rst 1.0 KB

12345678910111213141516171819202122232425262728
  1. Admin APIs
  2. ==========
  3. This directory includes documentation for the various synapse specific admin
  4. APIs available.
  5. Authenticating as a server admin
  6. --------------------------------
  7. Many of the API calls in the admin api will require an `access_token` for a
  8. server admin. (Note that a server admin is distinct from a room admin.)
  9. A user can be marked as a server admin by updating the database directly, e.g.:
  10. .. code-block:: sql
  11. UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
  12. A new server admin user can also be created using the
  13. ``register_new_matrix_user`` script.
  14. Finding your user's `access_token` is client-dependent, but will usually be shown in the client's settings.
  15. Once you have your `access_token`, to include it in a request, the best option is to add the token to a request header:
  16. ``curl --header "Authorization: Bearer <access_token>" <the_rest_of_your_API_request>``
  17. Fore more details, please refer to the complete `matrix spec documentation <https://matrix.org/docs/spec/client_server/r0.5.0#using-access-tokens>`_.