I am getting 403 error while calling "https://api.enterprise.apigee.com/v1/organizations/firstdatanp/apis/**Test/. I am using restTemplate for sending request..please advise
pls check if you have necessary roles in the organization - 'firstdatanp'. Are you able to access this organization/api in the UI?
Yes I can access same URL from my local client. I am using httpClient for the same but as soon as I deploy the client in websphere dev server it gives me <big>Access Denied (policy_denied)</big> error.
Sample code which works perfectly in local but not with websphere :
DefaultHttpClient httpclient = new DefaultHttpClient();
UsernamePasswordCredentials usernamePasswordCredentials = new UsernamePasswordCredentials("can no provide in this forum*", "*can no provide in this forum*"); HttpHost proxy = new HttpHost("myProxy**", 80);
// Add AuthCache to the execution context
BasicHttpContext localcontext = new BasicHttpContext();
HttpGet httpget = new HttpGet("https://api.enterprise.apigee.com/v1/organizations/firstdatanp/apis/"+api); httpget.addHeader(new BasicScheme().authenticate(usernamePasswordCredentials, httpget, localcontext)); httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); HttpResponse response = httpclient.execute(httpget)
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |