Hello,
we have set up our backend to create and modify issues via Jira Cloud api and oauth2. We can successfully create the authorization_code, use that code to get an access_token, and use the access_token in the HTTP request headers to create and modify issues. We can also refresh the access_token successfully.
However, the refresh_token seems to expire after 10 minutes, and, in order to get a new one, we need to rerun the entire flow, all over again. This is not possible for us, because our client, since it's part of a server to server setup, cannot click the "accept" button on the authorization page that opens in the browser in the first step of the flow. Also, we do not want to have to refresh access_token and refresh_token every 10 minutes if we don't need to make calls to the Jira REST api.
How can we get a new access_token/refresh_token pair without having to manually authorise, and without having to forcefully refresh the token every 10 minutes? In other words, how can we implement a 2LO flow to the REST api?