Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

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?

1 answer

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?

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

463 views 3 7
Read article

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