Skip to main content

Overview

Returns a function that fetches the total number of accepted connections for any user, identified by userId. Authentication is optional — the endpoint works without a token. When the caller is signed in, any user with a block between them and the caller, in either direction, is excluded from the count. Block filtering requires the moderation bundle.

Usage Example

Parameters

The hook returns a function. That function accepts:
string
required
The ID of the user whose connection count to fetch.

Returns

number
Total number of accepted connections for the specified user.