OAuth2 to connect to Xero API

From their website:

Invalid client

If the client_id or client_secret you pass in are incorrect then you will receive this response.

{
    "error": "invalid_client"
}

To solve this error, make sure you have the correct credentials for your app. Double check your client id in My Apps and try generating a new secret if required.