I have developed a Jira Forge app and successfully deployed it to my Jira Cloud site. Currently, it utilizes our own backend, hosted in a local environment, to add custom reports. The backend is built using .NET Core 6.0 API.
We now have a requirement to call the Jira API directly from our API. To achieve this, I created an OAuth 2.0 app in Jira to generate tokens for API calls. I followed all the steps outlined in the documentation provided here.
To obtain the "code," I opened the authorization URL in the browser, granted permission for the specific site, and used the "code" to request an access token from https://auth.atlassian.com/oauth/token
. The access token was successfully generated, but when I attempted to call the same API again after a few seconds, it returned an "Bad Request" ( {StatusCode: 400, ReasonPhrase: 'Bad Request') error.
Am I following the correct approach to calling the Jira API from my backend using this URL: https://api.atlassian.com/ex/jira/{cloudid}/{api}
? Currently, I'm facing this issue while developing on my local machine and trying to retrieve the project list.
Please help me with correct path.
hi , try to whitelist this api's as well IP addresses and domains for Atlassian cloud products | Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to Atlassian Community.
The url you are referring is correct, but re-check whether you have provided the correct token(which is generated--might be copy - paste issue) and re-check permission to the app.
try to regenerate the token and try once again.
Also check there are few known issues for this type of apps in the same page you are referring.
Also check below knowledge urls to know if you are missing something.
The Jira Cloud platform REST API (atlassian.com)
Jira REST API examples (atlassian.com)
or if doesn't work anything,
I assume you have paid subscription, so you can directly raise support ticket from below url, so that, if the error is particular to your app, then you will get support ASAP and have a track of your request.
https://support.atlassian.com/contact/#/
Vikram P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reply. Just for Information. I'm using same code to generate token.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.