delete_account
This endpoint will let user delete his account.
You can get nonce value to be used with this endpoint by calling
http://localhost/api/get_nonce/?controller= userplus&method=delete_account
Be very careful using ‘delete_account’, this will delete the user account.
Postman Screenshot:
Resource URL
http://localhost/api/userplus/delete_account/
Method
POST
Required Parameters
- cookie
- nonce – use get_nonce for controller= userplus & method=delete_account. You can also disable nonce requirement from Settings > UserPlus.
- key – get API key from Settings > User Plus
Optional Parameters
- none
Sample Request URL
http://localhost/api/userplus/delete_account/?key=KEY-HERE&cookie=COOKIE-HERE&nonce=NONCE-HERE
This end point did not work for me /
after providing a valid cookie and a success response
{
“status”: “ok”,
“deleted”: false
}
Is any required setups needed
What is your plugin version? Endpoint works, I have tested it again.
I’m trying to use this end point, bust I get response with “deleted”: false
Your user doesn’t have rights to delete account. Please try to do that using admin cookie.
Using admin cookie associated with the generate_auth_cookie response return an error response with this message : “error”: “Invalid authentication cookie. Use the `generate_auth_cookie` Auth API method.”
You must be validating cookie to see this error message, you need to generate new cookie.
This API aint working as POST, it says invalid controller userplus.
And when using GET, it returns invalid authentication cookie although the cookie is generated by the login API
Just checked and tested and it works fine. Please see above screenshot of Postman endpoint request and response of endpoint. You should always use POST method, not GET.