Skip to main content
Get Connection Status
Returns the connection status between the authenticated user and the specified user. isConnected is true only for an accepted connection. Whenever a connection record exists between the two users, pending and declined included, the response also carries it under connection; whether a relationship exists at all is shown by the presence of connection, not by isConnected.
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 other user.

Query Parameters

string
Service key only, and required with one: the user this request acts as, whose connection with the user in the path is checked. A user token always acts as its own user and must not send it (400 connection/acting-user-not-allowed).

Response

On success, returns HTTP 200:
boolean
true only when the two users have an accepted connection. false when there is no connection record, and also when there is a pending or declined one.
object
The connection row between the two users, seen from the authenticated user’s side. Present whenever a connection record exists (pending, accepted or declined); absent when there is none.
A pending request the authenticated user sent
No connection record

Error Responses

A service key sent no actingUserId.
A user token 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