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, 2 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.

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