Invalid ClientID 401 on CS_REST_Clients

Hi All

We're just setting up a central dashboard for a customer to view various metrics, and having an issue using the CS_REST_Clients provided in the sample code.

Authentication is working fine, and we can pull list of countries / etc, however when we call

$wrap = new CS_REST_Clients(
    '12345',
    $auth);

Substituting in our client id for where i've put 12345 above too - same client id used in the get_authorize_url which is working without error - gives us the following :

Failed with code 401
object(stdClass)[7]
  public 'Code' => int 102
  public 'Message' => string 'Invalid ClientID' (length=16)

Have tried passing it as a string, and an integer, no luck.

Thanks!

Ken Ken, 2 years ago

Hi,

It's most likely that you're not using the correct ClientID. Check out http://www.campaignmonitor.com/api/getting-started/#clientid to see how you can get your ClientID (you want the ClientID and not the Client's API Key).

If that still doesn't work for you, please email support@campaignmonitor.com with your account url (https://something.createsend.com) and we'll dig deeper as to what the problem is.


http://www.campaignmonitor.com

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098