With our Jira server instance we used to run a self written console application that uses the REST API over basic authentication to pull data out of Jira.
After migration to Jira cloud this doesn't work anymore because basic authentication is not longer supported.
After a few hours of research I found two other ways to authenticate. OAuth and Connected Apps. Both seem to need Callback Endpoints which a simple console application is not able to provide. And the OAuth examples seem all to show the use case of a third party web site that uses redirection to interactivly authorize a user.
Is there any other simple way, to authorize a console app to use the jira REST API without user interaction without the need to build an interactive website that a user must use to login or to build an web api with endpoints needed for a connected app?
The OAuth way is ok, but the process of getting the access token base on userid and passwort should be done by the console app. Not by an interactive website with redirect and callback url.
So basically, how can I get an access token for the REST API from a console app non interactively?
@Holger Thiemann Basic auth is still supported on jira cloud. However you can't use email + password, you must use email + API key. See https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
I would recommend to create a separate Jira user, and use their API key for a script. Don't use the API key of a Jira Admin, because the API key inherits all permissions of the user.
Thank you. Exactly what I was looking for.
Don't know, while my researching only hits the OAuth, Connected App and Basic Auth with password results. Maybe this API Key functionality is a litte bit hard to find and should be mentioned in the other documents. :-)
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.