Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create an OAuth token to use the JIRA REST api

Deleted user March 26, 2018

I am trying to create a token so I can use the JIRA REST api in a script.  However, every link I found on Atlassian help site, the link is broken for the sample code to generate the OAuth token. 

 

https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-oauth-authentication-6291692/

These two links on this website is broken:

rest-oauth-client-1.0.one-jar.jar

rest-oauth-client-1.0-sources.jar

 

Is there some other link I can use?

Thanks in advance!!!

 

3 answers

1 accepted

2 votes
Answer accepted
Shaun S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2018

Hi Keav,

 

The updated tutorial for for creating an OAuth client in Java can be found here (link).  In short, you'll be building the jar file with resources provided by this Bitbucket repository (link). I went through the steps of the tutorial and confirmed that they are working so this should do the trick!

saurabh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 24, 2018

I've been banging my head on the wall , trying to get anything on same other than those links. while bitbucket integration works fine. For Jira and confluence there is no clear guide. I am struggling to find a way to enable oauth in my atlassion or JIRA account. does anyone know how and where i get an option to do that ?

-saurabh

Like # people like this
matt.faucher
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 5, 2020

I have been struggling to get the jar files to run. No matter what I do I get maven errors at compile time and it has been extremely frustrating. Is there really no other method to get my access token? I am trying to create an app that any authorized user can use Oauth and call the jira api to grab information about our projects.

Please any help would be greatly appreciated.

 

-Matt

Like Garrett Frierson likes this
Chris Goldsmith
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2020

The nodejs sample is broken too ... I looked at using that and it comes with out a package.json so you basically have to guess which versions of the various packages to use and no the latest versions of express does not work with the sample!

Surely this is a common enough workflow that it should have good documentation and up to date examples that can be copied ... now off to install JDK - to use with the java example!

We used to have a script that would tag our tickets with which version they were fixed in as part of our CI jobs, but this was broken for us by the change from basic auth to oauth - I tried with API keys, but that doesn't seem to work either :( 

Like # people like this
Andrew February 25, 2021

Hey @Shaun S or anyone else,

We're trying to read Jira data on a third party website using OAuth, and we're having problems using the Atlassian OAuth Examples.  

Do you have any advice for someone trying to setup this connection over from a remote server running cPanel that doesn't have Java enabled? 

We tried the NodeJS and PHP examples but they didn't work. The PHP example just gives a 500 error. 

Do you have any other advice for how we can read Jira data on a third party website? 

Perhaps we need to try a different method than the tutorials given. It seems like they're outdated at this point from 2013.

Any help or guidance would be greatly appreciated! 

If you have any questions please let me know.

4 votes
Jens Rosemeier
Contributor
May 16, 2019

Hi. Im note sure if this might be the right place to ask, but its just so overwheling heavy documentation and many places to start with...

 

Im too looking for details on the OAuth integration with Jira Cloud+Server REST API.

However, i need that for an external App which any user is able to use to connect with its own Jira instance for interacting with Jira.

All i can read about OAuth, it would require a manual interaction of an Jira *Admin* to create an Consumer Token first, before any further step can be done.

How would that work in real life, when this is an open available app, ready to be used for anyone with any Jira instance. Usually by endusers who do not have Admin privileges within Jira.

So far, i used Basic Auth and/or API Token to enable the user access to his Jira REST API.
But now with OAuth... How?

Is there any documentation, samples, ... on how to fully integrate an external APP seemless with Jira Rest API - *without* the need of a pregenerated Token by any Jira Admin?

BTW: Im talking about the thirs party app: https://github.com/ljay79/jira-tools

0 votes
Daniel Holmes
Contributor
June 19, 2018

Thanks for the links Shaun, this is something that I'm just starting to look into doing on our platform.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events