CORS Error with Rest API

Heitor Fernandes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 14, 2023

Hello everyone. This is my first time using a Jira Rest API, and I'm trying to integrate it into my Flutter project. I am using basic authorization for Jira. All of my code is working correctly, but when I attempt to publish my project, I encounter the following error. Could someone please help me with this issue?Captura de tela 2023-05-14 150057.png

1 answer

1 accepted

2 votes
Answer accepted
Steve Long -Evelon-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2023

Hi @Heitor Fernandes

Looks like this has already been answered in the below thread within the Atlassian developer community, so might be worth checking this out:

https://community.developer.atlassian.com/t/cors-error-with-rest-api/27354

Essentially though, CORS is an enforcement your browser is enforcing, because your browser notes that the domain for the URL you're requesting does not match the domain for the URL you're currently on.

My assumption is that you're trying to execute this from a client-side instance, rather than using some kind of backend programming language, hence the above. So the answer would be to instead use something like Python, Java, etc that runs on a server. 

Heitor Fernandes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 15, 2023

Oh, I see. Thank you very much for the explanation!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events