Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can't retrieve refresh_token with offline_access scope when using oauth2 3lo in jira app integration

Hi,

 

I can't seem to get a refresh token back in my authorization request. I have included the offline_access scope as direction in these docs

Here is my url:

 https://accounts.atlassian.com/login?state=6Xru9ZOjlRraECLpqflkZutaP-xURm6A&client=wKF8CdQoIjP022LJnfMjC2pIDgYg0A2q&protocol=oauth2&prompt=consent&audience=api.atlassian.com&scope=offline_access%20read%3Ajira-user%20read%3Ajira-work%20manage%3Ajira-project%20write%3Ajira-work&redirect_uri=http%3A%2F%2Flocalhost%3A3001%2Fjira&response_type=code

 

I am trying to make it so that the user of my integration doesn't need to re-auth every hour (which seems to be the expiration length of the oauth token)

 

Thank you!

2 answers

If anyone is still struggling, the refresh token is provided in the same dictionary as the access token.

 

So get the code using the authorisation url (making sure to add offline_access); your refresh token will then be in the response when you use that code to get the access token

@Henry_Cooper not working for me as well as I adding the offline_access in the scopes in authorisation URL and got code but while using the code to get the access token am getting only acess_token and not the refersh_token :(

Following this documentation https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps:

1.  Add `offline_access` to scope in the request to `https://auth.atlassian.com/authorize`, it will not return the refresh token.

2. Continue to the second step in the documentation: getting cloudid. Use the code from callback as in the documentation, the response of this request includes the `refresh_token`.

I didn't find it to be true.

This does not work. I still can't seem to get the refresh token in the first place myself. from when exchanging the code. I don't get the refresh token.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you