Re: Create API token for a user in Jira Server Locally.

Raffaele Guasco October 29, 2018

because I'm integrating the Tempo REST API in my application, I need to use the token to generate the requests.

The problem is that there are a lot of different users that need to use the same requests.

Is it possible to personalize the request with the token for the relative user? I mean, is there a possibility to create the request calling at the moment a rest to retrieve the token for the current user and create the request in java?

Many Thanks.

1 answer

1 vote
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 29, 2018

Hey Raffaele,

What you're going to want to do is set up OAuth in Jira to allow your application to act on behalf of users. 3-legged OAuth in Jira authorizes your application to act as multiple users just like you'll need.

We've got a great article explaining how the OAuth process works as well as some examples on getting them set up. Check it out here!

Cheers,
Daniel

Raffaele Guasco October 30, 2018

Hi @Daniel Eads,

I'm a bit confused. Is the Oauth authentication valid even to recognize the current user to use the Tempo API and of course, Confluence API?

 

Thanks.

Susanne Götz _Tempo_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 30, 2018

Hi Raffaele, 

On Server, to use the Tempo REST API's authentication with your username and password are required. Users will only be able to retrieve or edit information depending on their permissions ( f.x users are not able to retrieve worklogs if they are not allowed to view them in Timesheets).

To use the Tempo Servlet (https://tempoplugin.jira.com/wiki/spaces/TEMPO/pages/172785698/Tempo+servlet+manual) you need to use the Tempo Access token and the IP Address that requires access needs to be added in the Access control.

Regards
Susanne Götz
Tempo team

Raffaele Guasco October 30, 2018

Hi @Susanne Götz _Tempo_,

 

thanks for your reply. The problem is that implementing a portal, I need to redirect the user authenticated in the Portal (through google auth) to use the Tempo Rest API of my company.

I have only the user and no password. I need to retrieve the 'Tempo Access token' for the current user logged in the portal before to use the Tempo API. Does exist any API to call and retrieve the token based on the username?

 

I hope my question is clear.

 

Many thanks

Susanne Götz _Tempo_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 30, 2018

Hi Raffaele,

There is no user based Access token for the Tempo REST API's, but I recommend asking this in the Tempo Ecosystem where you can meet Tempo developers and other developers that are building with Tempo. 
Please go to https://www.tempo.io/developers to join the Tempo developer community.

Regards,
Susanne

Suggest an answer

Log in or Sign up to answer