Hello, I'm trying to make a request using the JIRA API. I included the needed username and password, but I'm getting a CORS error.
I've tried both axios and fetch.
What do I need to make a request in React? Any example?
Example:
```
const res = await axios.post( "https://team.atlassian.net//rest/api/3/project/Test", {},
{
auth:
{
username,
password,
},
}
);
```
Hi @Cecil Carter ,
welcome to the Atlassian Community!
Please see the documenation for the Jira cloud REST API. Basic auth could be used, but you should use API token instead of password, see here.
I would also recommend you to start with some simplier requests like GET project or issue. POST requests usually expects some additional data provided in your request.
There are also examples visible in the documentation. Not for the React, but still I believe it could help you.
I've also noticed your URL is not correct (two slashes), please use https://team.atlassian.net/rest/api/3/project/Test
Would you please provide us the exact error mesage you get?
Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.
Register today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.