Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid refresh token

Muskan Paliwal July 6, 2023

Hi,

I am trying to get access_token using the refresh_token that I have received when a user authorises our Oauth consumer but for every user, I am getting a `Invalid refresh token` error and the oauth consumer hasn't been edited. 

Plus this is happening even after the user re-authorises the oauth consumer. 

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 27, 2023

Hi @Muskan Paliwal,

Thank you for reaching out to the community.

When trying to generate a new access token using a refresh token, would it be possible for you to confirm if you're using the same client and secret keys?

Regards,
Mark C

Muskan Paliwal August 1, 2023

Hi @Mark,

Yess, I am using the same client id and client secret. And I am still facing the issue. Any help would be appreciated.

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 6, 2023

Hi @Muskan Paliwal,

Could you check if you can generate an access token using the below CURL commands?
First, try to generate a new access token:

curl -s -X POST -u "CLIENT_ID:SECRET" https://bitbucket.org/site/oauth2/access_token -d grant_type=client_credentials

After that, try to use the refresh token to generate a new access token.

curl -X POST -u "CLIENT_ID:SECRET" https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token=REFRESH_TOKEN_HERE

Let me know how it goes.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events