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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,460,422
Community Members
 
Community Events
176
Community Groups

How to consume Jira API in React or any other UI application

Hi,

 

Previously we use basic authentication to consume Jira REST API and display Jira tasks in the UI application. Our UI app directly sent a request with Authorisation header (basic auth) and received an answer. 

As basic auth is deprecated now we have to migrate to OAuth for REST APIs. here is an example of how it might be implemented with java app, but how to do the same process directly from the client application? Shell we somehow handle RSA-SHA1 keys from UI as well?

 

Any feedback is appreciated.

 

Thanks,

Pavel

1 answer

Hi

i am currently having the same issue with a React app; what i discovered so far: you can't do a POST request from your react frontend because of CORS policy. So you should do it via your backend. I saw that there is a way to whitelist domains in jira SERVER, but i can't find this option for jira SOFTWARE; in doing so, you could whitelist your localhost or front end site, and send POST request to Jira and create ticket for example. I am still using basic Auth.

This is what i discovered so far, but i'm investigating more to see if i can directly create a ticket with a post request from frontend, without the need of using backend

Hi  Raffaele Messina,

Can we do GET/POST calls directly from React?  Did you come across any solution to solve CORS? 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS

Atlassian Community Events