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(

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
  public 'Code' => int 102
  public 'Message' => string 'Invalid ClientID' (length=16)

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


Ken Ken, 3 years ago


It's most likely that you're not using the correct ClientID. Check out 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 with your account url ( and we'll dig deeper as to what the problem is.

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