Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • CredentialRequiredExcept thrown for webitem in Project Admin page for users other than System Admin

CredentialRequiredExcept thrown for webitem in Project Admin page for users other than System Admin

arunk February 28, 2018

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;
 }

0 answers

Suggest an answer

Log in or Sign up to answer