【问题标题】:How to pass custom parameters to sendy via node js api?如何通过node js api将自定义参数传递给sendy?
【发布时间】:2022-01-22 11:17:11
【问题描述】:

我正在尝试通过 sendy 的 api 在 sendy 中传递自定义数据。 Sendy 具有自定义字段属性,我们可以在其中传递数据。我正在使用 sendy 节点 js 包,其链接在 sendy 网站上提供。问题是我无法将自定义字段数据传递给 sendy api。这是我的代码

 var params = {
            email: email2,
            custom: {
                'assignmentDetail':assignmentLink,
                'submissionDetail':submissionDetail,
                'FormLink':reviewerFormLink,
            },
            list_id: ListID,
            api_key: 'vQzxtX76pNFekG4w5BzC'
        };
        sendy.subscribe(params, function (err, result) {  if (err){ 
                console.log(err.toString());
                }else{ 
                UpdateData(recordID, email2, ListID);     
                console.log('Subscribed succesfully');}
            });

自定义字段数据未在 sendy 中传递。请帮忙

【问题讨论】:

    标签: javascript node.js api sendy


    【解决方案1】:

    我找到了解决问题的方法。这很简单。您需要将自定义字段用引号括起来,然后就完成了。就这样

     var params = {
                email: email2,
             //make sure custom field names are same otherwise sendy would igore the fields
                    'assignmentDetail':assignmentLink,
                    'submissionDetail':submissionDetail,
                    'FormLink':reviewerFormLink,
                
                list_id: ListID,
                api_key: 'vQzxtX76pNFekG4w5BzC'
            };
            sendy.subscribe(params, function (err, result) {  if (err){ 
                    console.log(err.toString());
                    }else{ 
                    UpdateData(recordID, email2, ListID);     
                    console.log('Subscribed succesfully');}
                });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-28
      • 2022-01-06
      • 2021-08-18
      • 2015-03-04
      • 2015-07-23
      • 2013-06-03
      • 2022-06-24
      相关资源
      最近更新 更多