I have a Spring Boot app that I created following the instructions here:
https://bitbucket.org/atlassian/atlassian-connect-spring-boot/src/master/
I am able to install that app in my Jira instance and I can see it working, meaning, I can see a Hello World being printed to the screen. I am now trying to use the same app to register for web-hooks:
HttpResponse<JsonNode> response = Unirest.post("https://<my_domain>.atlassian.net/rest/api/2/webhook")
.basicAuth("<my_email>", "<API_Token>")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body(json)
.asJson();
System.out.println(response.getBody().toPrettyString());
However, I get the following error message in response:
{
"errorMessages": [
"Only apps can access this resource."
],
"errors": {}
}
I am following all the correct documentation as far as I know, so I am not sure what the issue is. This is clearly a connect app that I created using the documentation provided. I would really like to avoid to user OAuth if possible. Any help would be greatly appreciated!