SpreadWebServcie.AddSubscriberByInfo Method

添加了一个单一用户进入 当前的联系人名单通过他/她的电子邮件以及其他信息.例如名字, 公司、职位等.

public bool addSubscriberByInfo (

string loginEmail,

string password,

Subscriber subscriberArgs,

string subscription,

DoubleOptIn optInType

)

参数

参数

类型

描述

loginEmail

String

Spread账号的登录邮箱

password

String

Spread账号的登录密码或者 API Key.

subscriberArgs

Subscriber

添加订阅者的信息

subscription

String

要添加到联系人名单的名称

optInType

DoubleOptIn

Double Opt-in option.

返回结果

HTTP状态码为200,表示添加成功。
true/false表示是否需要联系人确认订阅,参见Double Opt-In

HTTP状态码 返回信息 状态
200 true 添加成功,需要联系人确定订阅
200 false 添加成功,不需要联系人确定订阅
500 Spreader Email and Password not match! 请检查参数loginEmailpassword是否填写错误,无误后检查请求的接口链接(常见问题
500 Subscription "xxxx" does not exist! 联系人名单“xxxx”不存在
500 Please provide a subscriber email. 参数subscriberArgsemail或者homePhone为空,请至少填写其中一个参数
500 Email address "123@123" is not valid! 电子邮箱格式错误
500 Fail to add subscriber. 添加联系人失败,请联系技术人员。
500 Email address is empty and phone "86xxx" is not valid! 参数subscriberArgsemail为空,homePhone格式错误

例子

string loginName = "spread@reasonables.com";

string loginPassword = "spread";

string customerEmail = "alan@reasonables.com";

string targetSubscription = "NoClone VIP";

DoubleOptIn addOption = DoubleOptIn.Off;

bool confirmIsNeeded;

 

//Create a Subscriber object

Subscriber customer = new Subscriber();
customer.email =
"alan@reasonables.com";
customer.firstName =
"Alan";
customer.lastName =
"Wo";
customer.company =
"Reasonable Software";

 

//Create a SpreadWebService object and use its method.

SpreadWebService MySpread = new SpreadWebService();

 

confirmIsNeeded = MySpread.addSubscriberByInfo (loginName, loginPassword, customer, targetSubscription, addOption);

^