这是关于 .NET 的 MailJet API - https://dev.mailjet.com/guides/?csharp#prepare-a-campaign
尝试创建广告系列时出现以下错误,
Root = {{ "ErrorInfo": "", "ErrorMessage": "无效的 json 输入:预期的 ",",但在流位置 133 ...ctsList":"|ContactLis...", "StatusCode “:400 }}
下面是代码,
var client = new MailjetClient(MjApikeyPublic, MjApikeyPrivate){
Version = ApiVersion.V3
};
MailjetRequest request = new MailjetRequest{
Resource = Campaigndraft.Resource,
}.Property(Campaigndraft.Locale, "en_US")
.Property(Campaigndraft.Sender, "Mailjet Dv1")
.Property(Campaigndraft.SenderEmail, "buddhika_jet@outlook.com")
.Property(Campaigndraft.Subject, "Greetings from Mailjet")
.Property(Campaigndraft.ContactsList, "10152")
.Property(Campaigndraft.Title, "Friday newsletter");
response = await client.PostAsync(request);
我对我通过的 Campaigndraft.ContactsList 值有疑问。考虑到官方 mailjet 文档,参数应该是(参考 - https://dev.mailjet.com/guides/?csharp#prepare-a-campaign),
.Property(Campaigndraft.ContactsListID, "$ID_CONTACTSLIST")
Campaigndraft.ContactsListID
但我在 mailjet API 版本 3 或版本 3.1 中找不到。
任何帮助都感激不尽。提前致谢。