Delete user per peertube API - example needed

Bon jour,

I need to delete users with the help of the REST API.

There is an introductory page, Getting started with REST API (joinpeertube.org), however, there is no example regarding user management.

I went to PeerTube REST API documentation (joinpeertube.org), however, there is no example.

I am pretty new to REST API. What would be an example string to delete a user?

Martin.

curl -X DELETE -H 'Authorization: Bearer the_authentication_token' https://your_instance/api/v1/users/the_user_id

Replacing the_authentication_token, your_instance and the_user_id by corresponding values.

The -X method specifies the HTTP method to use. Here DELETE. That’s the part in the documentation that is left to the API url.
Before deleting, you can test that it is the correct user by using -X GET.

The -H is the authentication token. See PeerTube documentation

Instead of the REST API, you can also use the Peertube CLI, which is a wrapper for the REST API:

Note: when registering a user with the CLI, your password will be in clear in a hidden file of your home.

Thank you, this was clarified well, and works well :slightly_smiling_face: