I am currently trying to access the RESTful interfaces using Java, but I keep receiving a 403 HTTP response code. I am assuming this has to do with the HTTP Basic authentication. Below is my code:
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.addRequestProperty("Authorization", "Basic " + authStringEnc);
int responseCode = ((HttpURLConnection) connection).getResponseCode();
logInfo("The response code is" + Integer.toString(responseCode));
The user that I am using is admin, thus having all privileges to carry out web services calls to the dashboards. Any suggestions?