无法在 OAuth 2.0 Jira Service Desk 集成中获取刷新令牌

Unable to get refresh tokens in OAuth 2.0 Jira Service Desk integration

我已启用 OAuth 2.0 并使用访问令牌调用 Jira Service Desk Rest 端点。

问题: 访问令牌每 1 小时过期一次。 根据 OAuth 2.0 文档,有两种方法可以在过期时获取新的访问令牌

第 1 步没有任何意义,因为它重定向到网页并且需要手动干预才能授权应用程序。 要使用第 2 步,我根本没有获得刷新令牌 https://auth.atlassian.com/oauth/token

通常会提供一个短期访问令牌。为了获得长期刷新令牌 offline_access 范围,应在授权 URL 中指定范围以获取授权代码。

https://auth.atlassian.com/authorize?
  audience=api.atlassian.com&
  client_id=YOUR_CLIENT_ID&
  scope=REQUESTED_SCOPE_ONE%20REQUESTED_SCOPE_TWO&
  redirect_uri=https://YOUR_APP_CALLBACK_URL&
  state=YOUR_USER_BOUND_VALUE&
  response_type=code&
  prompt=consent

这里的范围应该是scope=REQUESTED_SCOPE_ONE%20REQUESTED_SCOPE_TWO%20offline_access&