Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Use REST API from non interactive process

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?

1 answer

1 accepted

0 votes
Answer accepted

@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. :-)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

369 views 1 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you