Forums

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

Trying to generate Access token from refresh token using Auth 2.0 returns 401

Ebrahim Shakhatreh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2019

When I am trying to generate Access token from the refresh token API on my local host using Auth 2.0 (client id and client secret) it always returns 401 Unauthorized

 

I used this documentation to implement the 2.0 Auth ( https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps/ ) and then I used the question in the FQA part  ( 

How do I get a new access token, if my access token expires or is revoked? )

and it fails.

Curl request :

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

 

Response :

{"error":"access_denied","error_description":"Unauthorized"}

 

 

Any idea how to get this issue solved please ?

1 answer

0 votes
Thomas Deiler
Community Champion
July 15, 2019

Dear @Ebrahim Shakhatreh

the linked article says, that this functionality is in beta. I recommend to follow ACJIRA-1588 and contact the developers directly.

Probably helpful: 3LO and user revoking access and How to implement OAuth 2 (3LO)

so long

Thomas

Suggest an answer

Log in or Sign up to answer