Unable to get refresh token while Implementing OAuth 2.0

In OAuth 2.0 if my access token expires to get a new access token, I don’t have a refresh token.
In Step 2 :

curl --request POST \
  --url 'https://auth.atlassian.com/oauth/token' \
  --header 'Content-Type: application/json' \
  --data '{"grant_type": "authorization_code","client_id": "YOUR_CLIENT_ID","client_secret": "YOUR_CLIENT_SECRET","code": "YOUR_AUTHORIZATION_CODE","redirect_uri": "https://YOUR_APP_CALLBACK_URL"}'

I want to integrate Jira service desk Rest API’s with my chat bot application. To do so I enabled OAuth 2.0 and I am able to do get and post calls. However the access token I receive is a bearer and expires in hour.

According to the documentation
OAuth 2.0 there are 2 ways to get new access token when it expires but initiating the entire authorization flow from the beginning again does not make any sense to me.

But to follow Step 2 I don’t have any refresh token. Kindly help me

Hi @ToniyaSundaram,

A refresh token can be returned with the access token in your initial authorization flow. To do this, add the offline_access scope to the scope parameter of the authorization URL.

You can find out more about this topic from one of our FAQ - How do I get a new access token, if my access token expires or is revoked?


Could you give a bit more detail about the scope?

The doc says that “Only choose from the scopes that you have already added to the APIs for your app in app management” but I can’t find any service with offline_access.