ActiveCampaign / activecampaign-api-php

MIT License
115 stars 76 forks source link

Fixing segment/list issue #55

Closed haktansuren closed 8 years ago

haktansuren commented 8 years ago

Following code produces "An unexpected problem occurred with the API request." (image attached below the code)

$ac = new ActiveCampaign("API_URL", "API_KEY");
$ac->version(2);

$params = array(
        "sort" => "id",
        "sort_direction" => "DESC",
        "page" => 1,
);
$params = http_build_query($params);

$response = $ac->api("segment/list?$params");

echo "<p>Segments:</p>";
echo "<pre>";
print_r($response);
echo "</pre>";

image

Alternatively you can provide result_code or success in segment_list API output

pevans commented 8 years ago

I'm going to close this pull request pending some changes we will be making next week.