Hi,
Find out this documentation about AP.require, but I fail still to be able to POST data on some API entry points, such as this one, receiving 403 error:
AP.request({
url: "/rest/api/3/user/properties/" + propertyName + '?accountId=' + deeperData.atlassianAccountId,
type: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: '{}',
success: function(responseText){
console.log(responseText);
},
error: function(xhr, statusText, errorThrown){
console.log(statusText);
}
});
I was thiking that my app description may be missing the “WRITE” scope, but that’s not the case, here is the descriptor I’m using:
{
"development":
{
"localBaseUrl": "https://dbfb4e47.ngrok.io",
"scopes":["READ", "WRITE", "DELETE", "ACT_AS_USER"]
},
"production":
{
"port": "$PORT",
"errorTemplate": true,
"store":
{
"type": "postgres",
"url": "$DATABASE_URL"
},
"whitelist":
[
"*.jira-dev.com",
"*.atlassian.net",
"*.atlassian.com",
"*.jira.com"
],
"scopes":["READ", "WRITE", "DELETE", "ACT_AS_USER"]
}
}
I get 403 each time I try to post. I’ve been checking the accountId which is passed as URL request argument, it’s correct. I get 403 error on any Jira cloud instance (my development instance, some other production instances accessing my app)…
Any idea would be much appreciated, as I’m really stucked on that !!!
Thank you,
F.