This documentation is only for developers. If you are not a developer with good PHP coding skills then you have no need to read this.
If you want to deactivate a member’s account profile using a HTTP GET or POST request then use this documentation.
Enabling the API
WP eMember plugin has an API that allows you to deactivate a member’s profile using a standard HTTP GET or POST request. If you want to use this API then you need to enable it from the settings menu of the plugin first. The following is a screenshot of this section in the settings menu:
Using the API
Once you enable the API, you can start to send HTTP request to the following URL to deactivate a member’s profile remotely or from another software/application:
http://www.example.com/wp-content/plugins/wp-eMember/api/deactivate.php
You need to provide 2 pieces of information with the API request. These are:
- Secret Word/API Key (you specified it in the settings menu of the plugin)
- Member ID or the email address of the member.
You can optionally pass the account status that you want to set for the member (by default it will be set to inactive if you don’t pass any value).
1. Deactivate Member Account Using HTTP GET request
In order to deactivate a member account via HTTP GET request, use the following format:
http://www.example.com/wp-content/plugins/wp-eMember/api/deactivate.php?secret_key=XX&member_id=XX
OR the following (if you want to deactivate using the email address of the member):
http://www.example.com/wp-content/plugins/wp-eMember/api/deactivate.php?secret_key=XX&email=XX
Replace the ‘example.com’ and ‘XX’ with the appropriate values.
1. Deactivate Member Account Using HTTP POST request
To deactivate a member account via HTTP POST use the following format:
<form method="post" action="http://www.example.com/wp-content/plugins/wp-eMmeber/api/deactivate.php"> <input type="hidden" name="secret_key" value="XX"> <input type="hidden" name="member_id" value="XX"> <input type=submit value="Submit Post"> </form>
Replace the ‘example.com’ and ‘XX’ with the appropriate value.
Leave a Reply