|
6 | 6 | listId = 'YOUR_LIST_ID' |
7 | 7 | emailAddress = 'YOUR_SUBSCRIBER_EMAIL_ADDRESS' |
8 | 8 |
|
| 9 | +subscriberName = "YOUR_SUBSCRIBER_NAME" |
| 10 | +subscriberCustomFields = [] |
| 11 | +subscriberResubscribed = False |
| 12 | +subscriberConsentToTrack = 'Unchanged' |
| 13 | +subscriberMobileNumber = "+61491570006" # This is a reserved mobile number by the Australian Communications and Media Authority |
| 14 | +subscriberConsentToSendSms = "Yes" |
| 15 | + |
9 | 16 | subscriber = Subscriber(auth, listId, emailAddress) |
10 | 17 |
|
11 | 18 | # Get the details for a subscriber |
12 | 19 | ***REMOVED*** |
13 | 20 | ***REMOVED*** |
14 | 21 | ***REMOVED***print(property, ":", value) |
| 22 | +***REMOVED*** |
| 23 | +# Adding a subscriber |
| 24 | +***REMOVED***#This implemntation defaults the value of 'restart_subscription_based_autoresponders' to false |
| 25 | +subscriber.add(listId, emailAddress, subscriberName, subscriberCustomFields, subscriberResubscribed, subscriberConsentToTrack) |
| 26 | + |
| 27 | +# Adding a subscriber with a mobile number |
| 28 | +***REMOVED***#This implemntation defaults the value of 'restart_subscription_based_autoresponders' to false |
| 29 | +***REMOVED***#This also sets the default value of 'consent_to_track_sms' to 'unchanged', meaning new users will not receive SMS communications by default." |
| 30 | +subscriber.add(listId, emailAddress, subscriberName, subscriberCustomFields, subscriberConsentToTrack, mobile_Number=subscriberMobileNumber) |
| 31 | + |
| 32 | +#Alternative to set SMS tracking permissions |
| 33 | +***REMOVED***# This implemntation defaults the value of 'restart_subscription_based_autoresponders' to false |
| 34 | +subscriber.add(listId, emailAddress, subscriberName, subscriberCustomFields, subscriberConsentToTrack, mobile_Number=subscriberMobileNumber, consent_to_track_sms=subscriberConsentToSendSms) |
0 commit comments