get segments not working yet???

Hello,

I'm pretty new to CM so excuse my questions if they are silly :)

I've just downloaded the new PHP wrapper ( https://download.github.com/campaignmonitor-createsend-php-d2716de.zip ) and am trying out a few of the test examples. samples/list/get.php works fine, and returns the expected object.

samples/segment/get.php on the other hand does not seem to work :( It returns the following error:

================
Result of GET /api/v3/segments/{ID}
Failed with code 401
object(stdClass)#5 (2) {
  ["Code"]=>
  int(271)
  ["Message"]=>
  string(46) "Invalid SegmentID or the Segment doesn't exist"
}
==================

In both cases there are only two places where I add my info. Both take 'Your API Key' which I of course provided, and the list function requires a 'List ID', which I was able to find and provide, and hey, it works. The segment function requires a 'Segment ID'. As I can find no place in the UI to get the segment ID, I'm taking it out of the url once I'm on that segments edit page (&segID=650E2258BE66D57D) so I'm adding '650E2258BE66D57D' as the segment ID.

Why is it not working? What am I doing wrong?

Many thanks,

Jonny, 6 years ago

User error :/ For anyone else who runs into this, you need to find the segment ID by using the ID corresponding to the list/segment after retrieving the details of the list/segment using the API. For a similar issue, and some links to what you're supposed to do, see this thread: http://www.campaignmonitor.com/forums/viewtopic.php?id=4702

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free
1-888-533-8098