OAuth 3LO - Refresh Tokens

I’m having issues refreshing access tokens. I’m storing the refresh token and when the access token expires I planned to use it to get a new refresh token and access_token. Everything else with the access tokens seem to work as expected.

curl --request POST --url ‘https://auth.atlassian.com/oauth/token’ --header ‘Content-Type: application/json’ --data ‘{ “grant_type”: “refresh_token”, “client_id”: “VIda…”, “client_secret”: “h1Lq…”, “refresh_token”: “eyJr…” }’

Response:
{“error”:“access_denied”,“error_description”:“Unauthorized”}%

My work flow

  • User Authorizes access
  • User uses application
  • Access token expires in one hour.
  • Application sends Refresh token and exchanges it to generate a new access_token and refresh_token.

** this is my first application that integrates into jira. Can anyone confirm the curl statement for them is working?

I found my issue. The client secret was being encrypted and I forgot to decrypt it. This function does work as expected.