User Marketing Preferences

User Marketing Preferences#

class pywa.types.user_preferences.UserMarketingPreferences#

Represents user marketing preferences updates from WhatsApp.

Variables:
  • id – The WhatsApp Business Account ID that the update was sent to.

  • metadata – The metadata of the message (to which phone number it was sent).

  • timestamp – The timestamp when the update was sent.

  • from_user – The user who made the marketing preference change.

  • value (MarketingPreference) – The marketing preference chosen by the user, either stop or resume.

  • detail (str) – A description of the marketing preference change (e.g. User requested to stop marketing messages).

  • category (UserPreferenceCategory) – The category of the user preference, which is always marketing_messages.


class pywa.types.user_preferences.MarketingPreference#

The marketing preference chosen by the user.

Variables:
  • STOP – The user has requested to stop receiving marketing messages.

  • RESUME – The user has requested to resume receiving marketing messages.