I'm trying to utilise the JIRA Cloud REST API in an application I'm developing. Recently I've started getting 403 errors. My integration was reliable up until about a week ago, however these error responses have started to become very frequent.
I've followed the documentation for 3LO code grants. Currently, I have:
- an application called "App" setup under the application dashboard
- in the application dashboard, my "App" has access to both "Jira platform REST API" and "Authorization code grants"
- under "Jira platform REST API" for my "App", the View Jira issue data and View user profiles options are both added/enabled
When trying to authenticate with the JIRA Cloud REST API, everything seems to work as expected.
I begin by redirecting the user to authorise "App" to access data from JIRA via
https://accounts.atlassian.com/authorize
. I am including the following scope(s) in this request:offline_access read:jira-user read:jira-work
to ensure required read access and the ability for token renewal (ieoffline_access
)On authorisation, I am redirected back to my application and request an access token via
https://accounts.atlassian.com/oauth/token
(using the provided redirectcode
). This succeeds, and I now have validaccess_token
andrefresh_token
'sI now issue my first call to JIRA's Cloud REST API:
https://api.atlassian.com/oauth/token/accessible-resources
. I use theaccess_token
that was previously acquired to fetching my sitescloud_id
via this call. This works as expected and I now have my sitescloud_id
I now try a seconds call to JIRA's Cloud REST API:
https://api.atlassian.com/ex/jira/{MY_CLOUD_ID}/rest/api/3/search
. I use theaccess_token
in the same way as before via these request headers:headers: { 'Authorization': `Bearer { MY_ACCESS_TOKEN }`, 'Accept': 'application/json' }
The response I consistently get back is as follows:
As mentioned, this was working perfectly within the past week or so. Unfortunately, the JIRA documentation doesn't list 403
as a response code for the search method.