Why I got 401 - Unauthorized error for the oAuth2 AccessToken?

testadmin1 forticasb January 7, 2022

I am using the Oauth2 access token for the whole last year, and there is no issue, but recently I always got 401-Unauthorized error , below are the details:

 

1. Create an OAuth 2.0 integration app on https://developer.atlassian.com/console/myapps

2. Get authorization code by the link in myApp>Authorization>Jira platform REST API authorization URL

3. Get AccessToken by curl --request POST --url 'https://auth.atlassian.com/oauth/token' --header 'Content-Type: application/json' --data '{"grant_type": "authorization_code","client_id": {ClientID},"client_secret": {ClientSecret},"code": "v-TAFUul38VCjNgo","redirect_uri": "https://www.forticasb.com/api/v1/oauth/redirect/Jira"}'

 

4. Use the accessToken to run the API /rest/api/3/project

5. I got Encountered a 401 - Unauthorized error while loading this page.

 

 

 

I appreciate if anyone here can help me with it? I have no clue what's wrong.

 

Best,

Michelle

0 answers

Suggest an answer

Log in or Sign up to answer