MailChimp API成员信息问题 [英] MailChimp API member-info issue
本文介绍了MailChimp API成员信息问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要通过api检索所有用户信息,在我发现的文档中查找它: http://apidocs.mailchimp.com/api/2.0/lists/member-info.php
I need to retrieve all users infos via api, looking for it in the documentation I found this: http://apidocs.mailchimp.com/api/2.0/lists/member-info.php
这是我的代码:
$params = array(
'id' => $list_id,
'emails' => array(
'euid' => $member_id,
),
);
$infos = $this->MailChimp->call('lists/member-info', $params);
print_r($infos);
这是结果:
Array ( [success_count] => 0 [error_count] => 1 [errors] => Array ( [0] => Array ( [email] => 63a885b7cf [error] => "email" should be a struct [code] => -100 ) ) [data] => Array ( ) )
电子邮件"应为结构"是什么意思?
What does " "email" should be a struct " means?
推荐答案
已解决!
我的$params
数组是错误的.
Solved!
My $params
array was wrong.
MailChimp需要这样的数组格式:
MailChimp need an array format in this way:
$params = array(
'id' => $list_id,
'emails' => array(
0 => array(
'euid' => $member_id,
),
),
);
这篇关于MailChimp API成员信息问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文