Get your relationship with a user
GET /users/{ref}/relationship
Returns how you and the account ref are connected: whether each of
you follows the other, and whether each of you has blocked the
other.
You need to be signed in; no capability is needed. Without a session
cookie or bearer token that identifies you, the answer is 401,
whether or not public mode is on; there is no answer for visitors. A
ref that isn’t a whole number gets a plain-text 400 before sign-in
is checked, and a ref with no account gets 404. For your own
ref, is_self is true and the other four are false.
Both directions are shown to both people: if someone has blocked
you, is_blocked_by_them tells you so. The account’s status isn’t
checked.
The two follow flags can come from a cache on each server, while the two block flags are read fresh, and the four are read one after another rather than together. So an answer can mix older and newer state, for example right after a follow, an unfollow or a block, or when this server hasn’t caught up with a change. Server errors get a plain-text 500.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The account’s ref.
Responses
Section titled “ Responses ”How you and the account are connected.
How you and another account are connected. For your own account only
is_self is true.
object
true when the account is your own; the other four are then false.
true when you follow the account.
true when the account follows you.
true when you have blocked the account.
true when the account has blocked you.
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Resource not found
object
Human-readable error summary
Example
the request could not be completed