String encodeData =
new String(Base64.encodeBase64((clientId+":"+clientSecret).getBytes("ISO-8859-1")));
HttpClient client = HttpClients.createDefault();
HttpPost httpPost = new HttpPost("https://login.mypurecloud.jp/oauth/token");
httpPost.addHeader("Authorization", " Basic " + encodeData);
httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded");
httpPost.addHeader("grant_type", "client_credentials");
HttpResponse response = client.execute(httpPost);
It returns 400, is there anything wrong with my code?