Hi,
I’m trying to use AP.request in my add-on to retrieve the projects list from the JIRA Cloud. Like this:
AP.request('/rest/api/2/project', {
success: (response) => {
const projects = JSON.parse(response);
console.log(projects);
},
error: (response) => {
console.log(arguments);
},
contentType: 'application/json',
});
unfortunately, I’m getting the “[Simple-XDM] Failed to validate origin” error. More specifically the console contains this:
GET https://mydomain.atlassian.net/rest/api/2/project?_=1500204531842 403 ()
[Simple-XDM] Failed to validate origin: https://mydomain.atlassian.net
If I visit the https://mydomain.atlassian.net/rest/api/2/project URL manually, I get the projects list without any problems.
Could someone please help with what could be the problem here?