πŸ§ͺ Tests and Simulations: Creating Custom API Endpoints, Testing OAuth Workflows, and Advanced Payment Automations

2. πŸ”„ Example: Retrieving All Members (GET Request)

Description:

In this example, you’ll retrieve the list of members from your MemberPress site.

Steps:

  1. In Postman, set the request method to GET.
  2. Enter the URL: https://your-site.com/wp-json/mp/v1/members
  3. In the Authorization tab, select Bearer Token and add your API Key.
  4. Click Send.

Expected Response:

The API should return a JSON response with member information, such as:

[
{
"id": 1,
"username": "johndoe",
"email": "johndoe@example.com",
"status": "active"
},
{
"id": 2,
"username": "janedoe",
"email": "janedoe@example.com",
"status": "active"
}
]