This article explains how member-to-member blocks affect the results of the Members API, and how to handle blocks in your own app.
When a Members API method is called with a site member identity, the results take the current member's blocks into account. With any other identity, such as a Wix user or app identity, blocks don't affect the results.
- List Members and Query Members don't return members who blocked the current member or who the current member blocked.
- Get Member returns an error when the requested member is involved in a block with the current member:
- If the requested member blocked the current member, the method returns a
NOT_FOUND error, as if the member doesn't exist.
- If the current member blocked the requested member, the method returns a
NOT_FOUND error with the application code MEMBER_TO_MEMBER_BLOCKED.
If your app shows members or member-generated content, apply the same rule as the Members Area: neither member in a block should see the other or their content.
- To check blocks for a specific member, call List Member Blocks. It returns blocks in both directions, so you don't need to check each direction separately.
- To show the current member who they blocked, call List Current Member Blocking.
- A block doesn't notify the blocked member, so don't show the blocked member anything that reveals the block.