WordPress Membership

Easy to use WordPress Membership plugin

  • Documentation
  • WP eMember Plugin
  • Projects
  • Home

API – Querying A Member Profile Using HTTP GET or POST

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.

Filed Under: Additional Resources Tagged With: 3rd party integration, API, emember extension, Integration, WP eMember

Comments

  1. Chris Brown says:

    Just a little note to potential programmers. If everything is correct, this will return a JSON file with member_id and data. However ,,,

    If there is a problem., (ie if the secret key is missing / API not switched on etc) it will return a standard error message to the calling script. If your app simply json_decode’s the result, the errors reports will “throw” an error as it will not be in the format the decoder can read. You should really check the format of the results to see if it’s text or JSON.

    ** Of the three API routines, this is the only one to ‘suffer’ this anomoly, and something potential programmers need to prepare for. (Of course, most times there will be no errors, but there could be a chance.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the WP eMember Plugin

Get WP eMember

Categories

  • Additional Resources
  • Content Protection
  • Design & Usage
  • eMember Addon
  • Installation
  • Integration
  • License
  • Testing
  • Uncategorized
  • Video Tutorial

Recent Comments

  • Chris Brown on API – Querying A Member Profile Using HTTP GET or POST
  • admin on API – Updating A Member Account Using HTTP GET or POST
  • Chris Brown on API – Updating A Member Account Using HTTP GET or POST
  • admin on API – Updating A Member Account Using HTTP GET or POST
  • Andrea on API – Updating A Member Account Using HTTP GET or POST

Featured WordPress Plugins

WP Express Checkout Plugin
wordpress_estore_icon
wordpress membership plugin icon
wordpress_affiliate_plugin_icon

Copyright © 2025 | WP Membership Plugin