Deleting wp users through Postman
-
Hello!
I have successfully installed wordpress on my local machine’s xampp server and have several users added to a site I have created.
I am attempting to use an outside application, Postman, to send http requests to my local wordpress instance. I have refered to the REST API handbook on how to send GET, POST, DELETE, etc. requests to my wordpress site.
I am successful in submitting GET and POST requests, in which I have been able to view, create, and update user accounts. However, when sending DELETE requests: I continually receive the same error message:
{ "code": "rest_cannot_delete", "message": "The user cannot be deleted.", "data": { "status": 501 } }
The url I am using is:
https://localhost/wordpress/creed-thoughts/wp-json/wp/v2/users/6?reassign=4&force=trueThe user being deleted is a “subscriber” and has an id of 6. This user’s data is being reassigned to another user who also has “subscriber” access with an id of 4.
I have used this url (and modified it accordingly) for my GET and POST requests and have succeeded in viewing, creating, and updating users. I have played around with the url in attempting to delete different users and reassigning the data to other users with other credentials (such as “editor”, “contributor”, “super administrator”) and still received the same error message listed above.
Am I missing something in my url when attempting to delete a user? What does the error message really mean??
- The topic ‘Deleting wp users through Postman’ is closed to new replies.