Overview
TheAccountActivityClient provides methods for managing account activity webhooks and subscriptions, allowing you to receive real-time notifications about account events.
Initialization
Access the account activity client through the mainClient instance:
Key Methods
create_subscription()
Create a subscription to receive account activity events via webhook.Subscription configuration including webhook URL and event types
CreateSubscriptionResponse
Example:
get_subscriptions()
List all active subscriptions for your account. Returns:GetSubscriptionsResponse - List of active subscriptions
Example:
get_subscription_count()
Get the count of subscriptions for your account. Returns:GetSubscriptionCountResponse - Subscription count data
Example:
validate_subscription()
Validate a webhook subscription by triggering a CRC challenge.The unique identifier for the webhook configuration
ValidateSubscriptionResponse
Example:
delete_subscription()
Delete an existing subscription.The webhook ID for the subscription to delete
DeleteSubscriptionResponse
Example:
create_replay_job()
Create a replay job to retrieve historical activities from up to the past 5 days.The unique identifier for the webhook configuration
Starting UTC timestamp in
yyyymmddhhmm format (inclusive)Ending UTC timestamp in
yyyymmddhhmm format (inclusive)CreateReplayJobResponse
Example:
Authentication
Account activity endpoints require:- OAuth 1.0a User Token
- OAuth 2.0 User Context