Skip to main content

Method

client.users.retrieve(args: GetUserParameters): Promise<GetUserResponse>

Parameters

user_id
string
required
The ID of the user to retrieve.
auth
string
Bearer token for authentication. If not provided, the client-level auth is used.

Response

Returns a User object.
object
string
Always "user".
id
string
The ID of the user.
type
string
Type of the user. Possible values: "person", "bot", "agent".
name
string | null
The name of the user.
avatar_url
string | null
The avatar URL of the user.

Example

const user = await client.users.retrieve({
  user_id: "user-id-123",
})

console.log(user.name)

Build docs developers (and LLMs) love