Skip to main content

Viewing profiles

A profile is typically made up of a user's biographical information, and their posts.

info

To learn how to fetch a user's posts, see the Viewing feeds tutorial under "Author feeds."

Fetching a user's profile info

To fetch a user's profile info, you can use the getProfile method.

agent.getProfile
const { data } = await agent.getProfile({ actor: 'did:plc:...' })
const { did, displayName, ... } = data
ParameterTypeDescriptionRequired
actorstringThe DID (or handle) of the user whose profile you'd like to fetchYes

Fetching multiple profiles at once

Fetching multiple profiles is as easy as fetching a single profile:

agent.getProfiles
const { data } = await agent.getProfiles({ actors: ['did:plc:...', ...] })
const { profiles } = data
ParameterTypeDescriptionRequired
actorsstring[]The DIDs (or handles) of the users whose profiles you'd like to fetchYes