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 query a member 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 query 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 query a member’s profile remotely or from another software/application:
http://www.example.com/wp-content/plugins/wp-eMember/api/query.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.
The retrieved member data will be shown in JSON format.
1. Query Member Account Using HTTP GET request
In order to query a member account via HTTP GET request, use the following format:
http://www.example.com/wp-content/plugins/wp-eMember/api/query.php?secret_key=XX&member_id=XX
OR the following (if you want to query by email address of the member):
http://www.example.com/wp-content/plugins/wp-eMember/api/query.php?secret_key=XX&email=XX
Replace the ‘example.com’ and ‘XX’ with the appropriate values.
1. Query Member Account Using HTTP POST request
To query a member account via HTTP POST use the following format:
<form method="post" action="http://www.example.com/wp-content/plugins/wp-eMmeber/api/query.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