Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Connect with REST API through Oauth2.0

Hello everybody. I tried to connect to my jira cloud instance with basic authentication but it throws me "deprecation" error. I've generated the code api with Swagger.

Is it possible to use the same code api but with Oauth authentication?

2 answers

1 accepted

1 vote
Answer accepted
Ismael Jimoh Community Leader May 06, 2021

Hi @Matteo De Franceschi 

To connect your cloud instance using basic auth, you need to:

  1. Generate a token as explained here
  2. Next parse your username and the token as password to authenticate to your instance.

For Oauth, I believe this is also possible, however, I need to look this up.


Ismael Jimoh Community Leader May 06, 2021

You can have a look at the following for Oauth authentication with Cloud.


Ah ok, just tried and the authentication is working now.

Just another thing. When i try to achieve a Project it throws me this error:

Exception in thread "main" java.lang.IllegalArgumentException: missing discriminator field: <>
at com.atlassian.oauth.client.example.config.JSON.getDiscriminatorValue(
at com.atlassian.oauth.client.example.config.JSON.access$000(
at com.atlassian.oauth.client.example.config.JSON$18.getClassForElement(


Do you now something about?

Any updates on this, would be great if anyone could help in how to tackle this?

I got this to work, that is I have a test project which I can read the content of the issue with the correct oauth2 token and this path : 

first you go here :

create a app. Add all the scopes you need for access and take note of the client secret parts it generates

then you can go here :
with grant type client_credentials

client_id and client_secret from that previous page

scope = your list of scopes you want

and if thats correctly done you get a access_token


then you call this : 


and from there you get id: url etc. use that id as couldid here in the last thing below<cloudid>/rest/api/3/issue/<projectname>-<issue number>


and from that you can get issue details from jira.


hope that helps.




Hi,  when call this : 

return all jira site, but i want to get only the datanet of the one i selected from sending code․ what can I do?

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events