We are using the Java API to do direct login. The code works fine for one of the accounts/OAuth clients but fails for two others.
String userName = "...";
String userPassword = "...";
String consumerKey = "...";
String consumerSecret = "...";
OAuth2Api authApi = new OAuth2Api(consumerKey, consumerSecret);
TokenResponse response = authApi.directLogin(userName, userPassword);
The same happens when I use the corresponding cURL request.
curl -X POST -H "Authorization:Basic ..." \
-H "Accept:application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
"https://api.getgo.com/oauth/v2/token" \
-d 'grant_type=password&username=...&password=...&client_id=...'
This is the error message:
{
"error":"invalid_client",
"error_description":"Client authentication failed."
}
The two accounts that don't work were created this week. The one that works was created many months ago.
Is there something we need to do to the accounts to enable direct login?