Problem: I get 403 Forbidden error, when I try to call the Atlassian Rest API from my Spring Boot application(using Spring RestTemplate).
My Approach: I am trying to develop an application for JIRA Cloud. I am using Angular for app and Spring Boot for custom services. I am not using the Spring Boot Starter/Template provided by Atlassian because I am deploying Angualr app separately and spring services as micro services separately. I have the app-descirptor in the angular application and I am able to install the application. I have written custom '/installed' handler in my Spring microservice.
I am able to create JWT token and request for OAuth token using the parameters stored as part of '/installed' lifecycle.
As I mentioned, I am not using the atlassian connect spring libraries.
Am I missing something which Atlassian-connect libraries do?
I tried with this:
https://mysitename.atlassian.net/rest/api/latest/myself
Error:
2019-08-11 13:41:11.592 ERROR 1 --- [nio-8097-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.client.HttpClientErrorException$Forbidden: 403 Forbidden] with root cause
org.springframework.web.client.HttpClientErrorException$Forbidden: 403 Forbidden
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:83) ~[spring-web-5.2.0.M3.jar!/:5.2.0.M3]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:123) ~[spring-web-5.2.0.M3.jar!/:5.2.0.M3]