I am using the atlassian-connect-spring-boot framework and having difficulties getting a response from the JIRA Rest API https://developer.atlassian.com/cloud/jira/software/rest/ via OAuth. I have added
ACT_AS_USER to the scopes in the app descriptor which is correctly setting the
AtlassianHost after the installation event.
I attempt to retrieve all boards using the following code.
RestTemplate authenticatedRestTemplate = restClients.authenticatedAs(atlassianHostUser); ResponseEntity<String> response = authenticatedRestTemplate.getForEntity("/rest/agile/1.0/board", String.class);
However, I get a 400 response. After a little digging I see that it is not able to talk to the auth server and I get the message
Server returned HTTP response code: 400 for URL: https://auth.atlassian.io/oauth2/token.
Has anyone come across this before? Any help is appreciated.