Skip to main content
Get Connections Count
Returns the total number of accepted connections for the specified user. Authentication is optional — the endpoint works without a token. When the request has a viewer — the signed-in user, or the user a service key names in actingUserId — any user with a block between them and the viewer, in either direction, is excluded from the count. Block filtering requires the moderation bundle.
Requires the connections bundle. A project without the connections bundle returns 403 database/tables-not-available. See Bundles.

Path Parameters

string
required
The Sublay user ID (UUID) of the user whose connection count to retrieve.

Query Parameters

string
Service key only: the user to read as. The response is exactly what that user’s own access token would get — users block-edged with them are left out. Leave it out for the anonymous view. A user token always acts as its own user and must not send it, and neither may a request with no credentials (400 connection/acting-user-not-allowed).

Response

On success, returns HTTP 200:
number
Total number of accepted connections for this user.

Error Responses

A user token, or a request with no credentials, sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.

See Also