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
- Typescript
- Python
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
To fetch a user's profile info, you can use the get_profile
method.
agent.get_profile
data = client.get_profile(actor='did:plc:...')
did = data.did
display_name = data.display_name
Parameter | Type | Description | Required |
---|---|---|---|
actor | string | The DID (or handle) of the user whose profile you'd like to fetch | Yes |
Fetching multiple profiles at once
Fetching multiple profiles is as easy as fetching a single profile:
- Typescript
- Python
agent.getProfiles
const { data } = await agent.getProfiles({ actors: ['did:plc:...', ...] })
const { profiles } = data
client.get_profiles
data = client.get_profiles(actors=['did:plc:...', ...])
profiles = data.profiles
Parameter | Type | Description | Required |
---|---|---|---|
actors | string[] | The DIDs (or handles) of the users whose profiles you'd like to fetch | Yes |