members
This endpoint is used to get members of BuddyPress. There are many optional parameters are available to filter and sort the results.
All Members – Active
http://localhost/api/userplus/members/?key=KEY-HERE
All Members – Random
http://localhost/api/userplus/members/?key=KEY-HERE&type=random
All Members – Popular
http://localhost/api/userplus/members/?key=KEY-HERE&type=popular
All Members – Aphabetical
http://localhost/api/userplus/members/?key=KEY-HERE&type=alphabetical
All Members – Newest
http://localhost/api/userplus/members/?key=KEY-HERE&type=newest
Friends of User from Members
http://localhost/api/userplus/?key=KEY-HERE&user_id=1
Friends of User from Members with xprofile fields
http://localhost/api/userplus/?key=KEY-HERE&user_id=1&xprofile=Birthday,Beruf,Kinder
All Members – include only provided user_ids
http://localhost/api/userplus/members/?key=KEY-HERE&include=1,3,5,7
All Members – exclude provided user_ids
http://localhost/api/userplus/members/?key=KEY-HERE&exclude=1,3,5,7
Search Members – search_terms
http://localhost/api/userplus/members/?key=KEY-HERE&search_terms=john
Resource URL
http://localhost/api/userplus/members/
Method
Required Parameters
- key – get API key from Settings > User Plus
Optional Parameters
- type - Defines the type of users to return. Accepted arguments: active, newest, popular, alphabetical, random. Default value: active
- user_id – filter friends from members by user_id. Default: false
- include – Pass a user_id or string of comma separated user_ids to return on these users. Default value: false
- exclude – Pass a user_id or string of comma separated user_ids to exclude those users in the return. Default value: false
- limit – Number of activity items to show per page. Default is 10.
- page - Which page to return based on the number limit value. Default= 1.
- search_terms – Return members that match these search terms. Default value: false
- meta_key - Only return users with this usermeta field. Default value: false
- meta_value - Only return users where the usermeta value matches. Requires meta_key. Default value: false
Sample Request URL
http://localhost/api/userplus/members/?key=KEY-HERE&type=random