When i access the Project Administration page using System administrator, I am getting the response, but if the Project Administrator access the Webitem in Administration page, it throws credentialRequiredException.
I am trying to fetch the confluence pages using rest api’s. Can someone provide reason for this and possibly a solution to recover from this?
public String getResponseBody(String projectKey, String apiURL) {
String responseBody = null;
try {
ApplicationLinkRequestFactory requestFactory = getApplicationLink(projectKey);
if (requestFactory != null) {
ApplicationLinkRequest request = requestFactory.createRequest(MethodType.GET, apiURL);
responseBody = request.execute();
}
return responseBody;
} catch (ResponseException e) {
e.printStackTrace();
} catch (CredentialsRequiredException e1) {
e1.printStackTrace();
}
return responseBody;
}