40012: Invalid client ID

invalid_client_id

The client ID supplied was not acceptable, for example because it was empty, a wildcard, not a string, or did not match the client ID permitted by the credentials in use.

What you should do

Supply a valid client ID, and if the client uses token authentication as an identified client, make sure it matches the client ID its token was issued for.

Why it happens

Most often the supplied client ID doesn't match the one the token permits: a token authorizes either a single client ID or a wildcard, and a client can't assume an identity outside what its token allows. The value is also rejected if it is empty, not a string, or the reserved wildcard * used as an actual identity.

What you'll see

The error is reported with code 40012 and HTTP status 400. The message names the problem, for example invalid clientId or Invalid token; clientId must be a string.