Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member API data different depending on endpoint


  • emanweb1
    Participant

    @emanweb1

    Hello everyone,

    First of all, thank you for the plugin and support here, it’s been very helpful, especially the API.

    I have some confusing things happening with my buddypress API. If I list all pages with the /buddypress/v1/members/ endpoint, then I get all the members of my website.

    But if I used /buddypress/v1/members/<user_id> endpoint then I get a lot more members, including some that have applied (which I didn’t approve) and others that don’t show up on the website at all.

    What exactly is included in each of the endpoints?

    I’ve looked at different messages on the API here and also the reference but I didn’t find an explanation.

    Thanks!
    Eman

Viewing 4 replies - 1 through 4 (of 4 total)

  • astroo
    Participant

    @astroo

    It seems that the /buddypress/v1/members/ endpoint returns only approved and active members displayed on your website. On the other hand, the /buddypress/v1/members/<user_id> endpoint may include all members, regardless of their status, such as pending applications or unapproved members. The extra members you’re seeing could be those who have applied but are not yet approved or are inactive. You may want to add query parameters or filters to refine the results.


    emanweb1
    Participant

    @emanweb1

    Thanks astroo!
    Is there a way to tell apart why users end up there, so I can improve the query?
    Some of the members have x_profile information, which is not in my sign up form, so I’m a bit confused about why those are in the members/<user_id> endpoint.


    Renato Alves
    Moderator

    @espellcaste

    @emanweb1 Can you share the request you are sending? Who’s logged in when performing this request? Is it a user? A regular user? An admin? Are you using an application password?


    emanweb1
    Participant

    @emanweb1

    Thanks Renato for the questions.

    The API isn’t using a login or password, just the open API as it was the easiest way.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar