Hello,
I’m looking for a guide on how to get my OAuth token access to my organisation. I need to make some API requests as part of a pipeline Powershell script. I’ve created an app in order to get a client ID and secret with the appropriate permissions, which I’m using the auth endpoint to exchange for a bearer token, but that token doesn’t yet have access to the issues in our org. From the docs, it seems I need to install it to our workspace, but this isn’t something I want to deploy to the marketplace (it’s just a local, internal tool) - so what are the steps to grant it the access required?
The token should have access but only to api.atlassian.com . You can still hit all the Jira endpoints but via a URL on that domain (check the docs, you’ll need the cloudID of your site). The token, if you granted the correct scopes, will be able to do whatever the user who did the OAuth dance can do.
There is no user as such, it’s for a Machine-to-Machine request, so I’m effectively trying to do 2LO. When I hit GET “https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/issue/$IssueId” I’m just getting a 404 back
Edit: updated the cloud ID after doing some more investigation and I’m now getting a 401(Unauthorized) on the above endpoint. The app has read:jira-work and read:jira-user permissions. Does that sound correct?
Additionally, hitting “https://api.atlassian.com/oauth/token/accessible-resources” with my bearer token returns an empty response.
I still haven’t succeeded with this. It’d be great to know if it’s doable.