Javascript mailchimp取消订阅节点js服务器
我在mailchimp取消订阅过程中遇到问题。 请你能给我提供退订流程的方法吗。如何准确地放入退订列表以及我应该请求哪些文件。以及我如何知道电子邮件应该放在取消订阅列表中的区别Javascript mailchimp取消订阅节点js服务器,javascript,node.js,mailchimp,mailchimp-api-v3.0,unsubscribe,Javascript,Node.js,Mailchimp,Mailchimp Api V3.0,Unsubscribe,我在mailchimp取消订阅过程中遇到问题。 请你能给我提供退订流程的方法吗。如何准确地放入退订列表以及我应该请求哪些文件。以及我如何知道电子邮件应该放在取消订阅列表中的区别 mailchimp.post('/lists/{id}', { email_address : "email@email.com" }) .then(function(results) { console.log(results) }) .catch
mailchimp.post('/lists/{id}', {
email_address : "email@email.com"
})
.then(function(results) {
console.log(results)
})
.catch(function (err) {
console.log(err)
});
响应误差
{ Error: The resource submitted could not be validated. For field-specific details, see the 'errors' array.
at Request._callback (/Users/Gizbreht/Desktop/myofer-mailer-express/node_modules/mailchimp-api-v3/index.js:506:30)
at Request.self.callback (/Users/Gizbreht/Desktop/myofer-mailer-express/node_modules/request/request.js:187:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/Users/Gizbreht/Desktop/myofer-mailer-express/node_modules/request/request.js:1126:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/Users/Gizbreht/Desktop/myofer-mailer-express/node_modules/request/request.js:1046:12)
at IncomingMessage.g (events.js:291:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
type: 'http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/',
title: 'Invalid Resource',
status: 400,
detail: 'The resource submitted could not be validated. For field-specific details, see the \'errors\' array.',
instance: '',
errors:
[ { field: '',
message: 'Required fields were not provided: members' } ] }
{错误:无法验证提交的资源。有关特定于字段的详细信息,请参阅“错误”数组。
应请求。_回调(/Users/Gizbreht/Desktop/myofer-mailer-express/node_modules/mailchimp-api-v3/index.js:506:30)
at Request.self.callback(/Users/Gizbreht/Desktop/myofer-mailer-express/node_-modules/Request/Request.js:187:22)
两点钟(events.js:106:13)
at Request.emit(events.js:191:7)
应请求。(/Users/Gizbreht/Desktop/myofer-mailer-express/node_-modules/Request/Request.js:1126:10)
在emitOne(events.js:96:13)
at Request.emit(events.js:188:7)
在输入消息时。(/Users/Gizbreht/Desktop/myofer-mailer-express/node_-modules/request/request.js:1046:12)
在IncomingMessage.g(events.js:291:16)
在emitNone(events.js:91:20)
在IncomingMessage.emit(events.js:185:7)
在endReadableNT(_stream_readable.js:974:12)
at _combinedTickCallback(内部/流程/下一步_tick.js:74:11)
在进程中。_tick回调(内部/process/next_tick.js:98:9)
类型:'http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/',
标题:“无效资源”,
现状:400,
详细信息:“无法验证提交的资源。有关特定于字段的详细信息,请参阅“错误”数组。”,
实例:“”,
错误:
[{字段:“”,
消息:“未提供必需字段:成员”}]}
mailchimp.post('/lists/{id}', {
"members" : [{"email_address": email, "status": "unsubscribed"}],"update_existing":true
})
.then(function(results) {
console.log(results)
})
.catch(function (err) {
console.log(err)
});