【问题标题】:Getresponse v3 api -add contact errorGetresponse v3 api - 添加联系人错误
【发布时间】:2016-12-20 04:18:09
【问题描述】:

我使用 getreponse php 客户端 (https://github.com/GetResponse/getresponse-api-php/blob/master/src/GetResponseAPI3.class.php) 将联系人添加到列表中。

$fname ="mike";
$lname = "";
$email = "mike@test.com";

$getresponse = new GetResponse('xxxxxxxxxxxxxxxxxxx');

$response = $getresponse->addContact(array(
'name'              => $fname . " " . $lname,
'email'             => $email,
'dayOfCycle'        => 0,
'campaign'          => array('campaignId' => '999999999')
));

我在尝试此代码时收到此错误:

object(stdClass)#2 (7) { ["httpStatus"]=> int(403) ["code"]=> int(0) ["codeDescription"]=> string(38) "Internal error, please contact support" ["message"]=> string(58) "Access Forbidden! You have no access to campaign: 9999999" ["moreInfo"]=> string(46) "https://apidocs.getresponse.com/en/v3/errors/0" ["context"]=> array(0) { } ["uuid"]=> string(36) "503b85fb-799c-46ec-b297-" }

我有正确的 API 密钥和活动 ID。

有什么帮助吗?

【问题讨论】:

    标签: php api getresponse


    【解决方案1】:

    请在您的请求中使用广告系列令牌,而不是使用广告系列名称。 您可以使用此 api 方法获取包括令牌在内的活动列表:

    https://apidocs.getresponse.com/en/v3/resources/campaigns#campaigns.get.all

    它在我这边工作没有任何问题

    【讨论】:

    【解决方案2】:

    我不知道为什么它不适合你..但它工作得很好..我在过去 3-4 天一直在搜索这段代码。

    我从你提到的 github 下载了 sdk 文件。后来我做了以下编码。这是我所做的改动:

    require_once dirname(__FILE__) . '/getresponse-api/src/GetResponseAPI3.class.php';
    $fname ="mike";
    $lname = "";
    $email = "mike@test.com";
    
    $getresponse = new GetResponse('xxxxxxxxxxxxxxxxxxx');
    
    $response = $getresponse->addContact(array(
    'name'              => $fname . " " . $lname,
    'email'             => $email,
    'dayOfCycle'        => 0,
    'campaign'          => array('campaignId' => '999999999')
    ));
    
    
    echo print_r($response);
    

    【讨论】:

      猜你喜欢
      • 2019-06-25
      • 2017-07-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多