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

HOW TO do authorization code call in POSTMAN

I am asking for JIRA software 

the way to do OAUTH2.0 authentication call is here: https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/

from this document I got to know how to authenticate using OAUTH2.0. But the thing is I have to put the Authorization code URI in Browser to get the auth code you can refer to this

video: https://www.youtube.com/watch?v=ayiGEctaky0&t=4s

timestamp: 2:48 onwards

then after that I can make the access token request with the help of that AUTH code

but what I want to know is , how can I do this AUTHORIZATION CALL  thing in POSTMAN

How can I do the Authorization call inside postman?????

1 answer

0 votes

Hello @Abhishek Jaswal ,

 

If I understand correctly you are following the steps (quoted below) of the section named Implementing OAuth 2.0 (3LO) of the documentation page you linked, and you are asking how to execute step #2 (Exchange the authorization code for an access token) using POSTMAN. Is this correct?

Implementing OAuth 2.0 (3LO)

Once you have enabled OAuth 2.0 (3LO) for your app, you can implement it in your app's code. There are a number of key parts to this:

  1. Direct the user to the authorization URL to get an authorization code
  2. Exchange the authorization code for an access token
  3. Authorize any calls to the product APIs using the access token
  4. Check site access for the app

 

If my understanding is correct, then you can just use the same data from the Curl example that is just below the title of the second step and put it in the corrispettive fields in Postman:

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

 

Find in the below screenshot the corrispettive fields in Postman:

postman.jpg

 

Of course you also have to add the content-type:

postman2.jpg

 

Finally, for the future, please notice that this is not the best place to get help on development  related questions. The right resources are listed in https://developer.atlassian.com/resources. 

Specifically:

 

Cheers,
Dario

Hi @Dario B 

I wanted to know about step 1 of this document :

https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/

PFA , this is the error I am getting when I am doing the authorization code call from the postman 

But when i did the same over the browser , I just pasted the same Auth URI over the browser so then it took me to the login page and then from there I granted the consent and after that It redirected me to my callback URL with the code 

But the same Procedure I want to implement over postman

please see if you could help me 

Capture3.PNGCapture2.PNG

Dario B Atlassian Team Feb 16, 2021

Hello @Abhishek Jaswal ,

I am not sure I understand correctly what you are asking for. However, being this a development related question, you may want to go ask the Developers Community.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
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