Skip to main content
Version: Next

UserClient

Client for managing user account information.

Provides methods to retrieve user details, monthly usage statistics, and account limits. When using an API token, you can access your own user information or public information about other users.

@example
const client = new ApifyClient({ token: 'my-token' });
const userClient = client.user('my-user-id');

// Get user information
const user = await userClient.get();

// Get monthly usage
const usage = await userClient.monthlyUsage();

// Get account limits
const limits = await userClient.limits();
@see

Hierarchy

  • ResourceClient
    • UserClient

Index

Properties

inheritedapifyClient

apifyClient: ApifyClient

inheritedbaseUrl

baseUrl: string

inheritedhttpClient

httpClient: HttpClient

optionalinheritedid

id?: string

optionalinheritedparams

params?: Record<string, unknown>

inheritedpublicBaseUrl

publicBaseUrl: string

inheritedresourcePath

resourcePath: string

optionalinheritedsafeId

safeId?: string

inheritedurl

url: string

Methods

get

  • get(): Promise<User>
  • Retrieves the user data.

    Depending on whether ApifyClient was created with a token, the method will either return public or private user data.

    @see

    Returns Promise<User>

    The user object.

limits

monthlyUsage

updateLimits

  • updateLimits(options): Promise<void>