Skip to content

The connection object

Onur Akpolat edited this page Oct 27, 2016 · 1 revision

Connections are the key to your social graph. We allow you to create follow or friend connections between your users.

Attribute Type Description
user_from_id integer Unique user identifier of the user the connection is going from
user_from_id_string string Unique user identifier of the user the connection is going from
user_to_id integer Unique user identifier of the user the connection is going to
user_to_id_string string Unique user identifier of the user the connection is going to
type string Defines type of connection (friend or follow)
state string The state of the connection (pending , confirmed or rejected)
confirmed_at timestamp Timestamp the connection was confirmed (friends only)

Friend vs. Follow

We allow you to create follow or friend connections between your users. Just specify the type to follow or friend and let us handle the rest.

Connection state

In some communities you want to give users the power to confirm or reject an incoming connection request. Especially when you're using the friends model, this is a very valid use-case. We allow you to specify a state when creating a connection. You can decide to create confirmed connections by default or pending ones first, that the other user has to confirm afterwards.

State Description
pending The connection was requested but is not yet activated.
confirmed The connection is confirmed and established.
rejected The connection has been refused.

Behind the scenes our API is handling the business logic that the connection states imply. For example it is not possible to create another connection if there is an existing one that has been rejected.

Clone this wiki locally