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 <a href="https://auth.atlassian.com/oauth/token" rel="noopener nofollow noreferrer" target="_blank">https://auth.atlassian.com/oauth/token</a>. 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: <a href="https://api.atlassian.com/ex/jira/%7Bcloudid%7D/%7Bapi" rel="noopener nofollow noreferrer" target="_blank">https://api.atlassian.com/ex/jira/{cloudid}/{api</a>}? 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.