> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # QueryMemberConnections # Package: activity # Namespace: MemberFollowers # Method link: https://dev.wix.com/docs/api-reference/crm/members-contacts/members/activity/members-followers/query-member-connections.md ## Permission Scopes: Read Member Connections: SCOPE.DC-MEMBERS.READ-FOLLOWERS ## Introduction Retrieves a list of members and their connections to the given member. > **Note:** If an empty array is passed as `connectedMemberIds`, the call will succeed, but it will not return any data. --- ## REST API ### Schema ``` Method: queryMemberConnections Description: Retrieves a list of members and their connections to the given member. > **Note:** If an empty array is passed as `connectedMemberIds`, the call will succeed, but it will not return any data. URL: https://www.wixapis.com/members/v3/followers/{memberId}/connections Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: connectedMemberIds Method parameters: param name: connectedMemberIds | type: array | description: List of member GUIDs whose connections to the given member will be retrieved. | required: true Return type: QueryMemberConnectionsResponse - name: connectedMembers | type: array | description: Retrieved list of members whose connections to the given member were retrieved. - name: connectedMemberId | type: string | description: Site member GUID. - name: followedByMember | type: boolean | description: Whether the listed member is followed by the given member. - name: followingMember | type: boolean | description: Whether the listed member follows the given member. ``` ### Examples ### Query Member Connections ```curl curl -X POST \ 'https://www.wixapis.com/members/v3/followers/24d1fada-b1fb-44e3-ab31-d48b243b9d34/connections' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' -d $'{ "connectedMemberIds": [ "27142d62-fecd-4607-afe1-05c45cff8d95", "abc688da-ff74-43c6-9262-4ce2b5d2606" ] }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.activity.MemberFollowers.queryMemberConnections(memberId, connectedMemberIds) Description: Retrieves a list of members and their connections to the given member. > **Note:** If an empty array is passed as `connectedMemberIds`, the call will succeed, but it will not return any data. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: connectedMemberIds, memberId Method parameters: param name: connectedMemberIds | type: array | description: List of member GUIDs whose connections to the given member will be retrieved. | required: true param name: memberId | type: string | description: Member GUID. | required: true Return type: PROMISE - name: connectedMembers | type: array | description: Retrieved list of members whose connections to the given member were retrieved. - name: connectedMemberId | type: string | description: Site member GUID. - name: followedByMember | type: boolean | description: Whether the listed member is followed by the given member. - name: followingMember | type: boolean | description: Whether the listed member follows the given member. ``` ### Examples ### queryMemberConnections ```javascript import { memberFollowers } from '@wix/members'; async function queryMemberConnections(memberId,connectedMemberIds) { const response = await memberFollowers.queryMemberConnections(memberId,connectedMemberIds); }; ``` ### queryMemberConnections (with elevated permissions) ```javascript import { memberFollowers } from '@wix/members'; import { auth } from '@wix/essentials'; async function myQueryMemberConnectionsMethod(memberId,connectedMemberIds) { const elevatedQueryMemberConnections = auth.elevate(memberFollowers.queryMemberConnections); const response = await elevatedQueryMemberConnections(memberId,connectedMemberIds); } ``` ### queryMemberConnections (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { memberFollowers } from '@wix/members'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { memberFollowers }, // Include the auth strategy and host as relevant }); async function queryMemberConnections(memberId,connectedMemberIds) { const response = await myWixClient.memberFollowers.queryMemberConnections(memberId,connectedMemberIds); }; ``` ---