Closed chengtie closed 3 months ago
I tried to use the following code to update TRANSACTIONAL_REMINDERS of aoxiang.paris@gmail.com (whose id is gx661wf91q518):
TRANSACTIONAL_REMINDERS
aoxiang.paris@gmail.com
gx661wf91q518
const { ListSubscribers } = require('node-mailwizz'); const config = { publicKey: 'key', secret: 'key', baseUrl: 'http://mail.mycompany.com/api' } const subscribers = new ListSubscribers(config); function updateSubscriber() { const userInfo = { EMAIL: "aoxiang.paris@gmail.com", TRANSACTIONAL_REMINDERS: "YES" }; subscribers.update({ listUid: "en804x0lnrf1f", subscriberUid: "gx661wf91q518", userInfo: userInfo }).then(result => { console.log('Subscriber updated:', result); }).catch(err => { console.error('Error:', err); }) } updateSubscriber()
It returned
Subscriber updated: { status: 'success', data: { record: { subscriber_uid: 'gx661wf91q518', email: '[aoxiang.paris@gmail.com](mailto:aoxiang.paris@gmail.com)', ip_address: '74.125.209.68', source: 'import', date_added: '2023-10-15 08:37:23' } } }
However, when i check it on the website of MailWizz, the field TRANSACTIONAL_REMINDERS is still empty.
Does anyone know what's the correct way to update a field of a subscriber by API in node?
https://forum.mailwizz.com/threads/node-api-to-update-a-field-of-a-subscriber.9134/
I tried to use the following code to update
TRANSACTIONAL_REMINDERS
ofaoxiang.paris@gmail.com
(whose id isgx661wf91q518
):It returned
However, when i check it on the website of MailWizz, the field
TRANSACTIONAL_REMINDERS
is still empty.Does anyone know what's the correct way to update a field of a subscriber by API in node?