Get a user's profile
GET /users/{ref}
Returns a person’s profile by account ref, for signed-in callers.
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. 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, unless an earlier answer for it is still cached.
This view always includes the full name where there is one, ignores
the owner’s choice to hide from visitors, and returns accounts
whatever their status. Answers are cached by ref with no expiry.
Editing the profile, creating, deleting, publishing or unpublishing
a post, or changing the account’s status asks every server to drop
its cached copy, but that request can fail or arrive late, so
answers can lag behind those changes, and behind others that don’t
ask at all, such as a restored post or a removed account. 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 ”The profile.
A person’s profile. Which names are included depends on whether
you’re signed in; see display_name and fullname.
object
The account’s username; an empty string if it has none.
The account’s full name. Sent only to signed-in callers, and only when it isn’t empty; profile edits don’t change it.
The name to show, never empty: the profile’s display name, then the
account’s full name, then the username, and as a last resort user
followed by the account number. For readers who aren’t signed in,
the full name is skipped.
An empty string when none is set.
The stored picture address; the server doesn’t upload, fetch or check it. Left out when unset; clearing it through this API returns an empty string.
An empty string when none is set.
The website address as saved; its format isn’t checked. Left out when unset; clearing it through this API returns an empty string.
Platform names mapped to handles or links stored in the profile; nothing is checked. Left out when there are none.
object
The owner’s language preference as saved, meant to be a tag such as
en or es-AR; the server doesn’t check it. Left out when not set.
The owner’s theme preference: light, dark or system, which
follows each device’s setting. Left out when not set.
When the account was created.
How many published posts the person has that aren’t deleted. Every one counts, including posts you can’t open, so it can be higher than what you can see.
The server a copied profile came from. Left out for this server’s own users; nothing in the API creates copies.
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