How to send a web request from Jira Automation to Tempo REST API v4?

Christoph Päper
Contributor
February 22, 2024

We’re using Jira Cloud with Tempo Timesheets. I’m an admin for both.

Upon a certain trigger in Jira Software, I want to automatically send a web request to the Tempo REST API and handle the result.

In its configuration pages, Tempo offers two authentication methods with different setting required and credentials generated:

  • REST API integration
    • Name
    • Expiration – 30, 60 or 90 days
    • Access Scope – full or custom
    • ⇒ single Token
  • OAuth 2.0 Authentication
    • Name

    • Redirect URL – the documentation is silent on what to enter here

    • Client Type

    • Authorization Grant Type

    • ⇒ Client ID
    • ⇒ Client Secret

Which one should I use in Jira Cloud Automation and how do I need to configure the Web Request Action exactly?

Since I’m in Europe, I’m using the base URL https://api.eu.tempo.io/4/ and append the respective end point from the documentation.

I tried the REST API integration with full access using a GET request to ./accounts. The request body is left empty. I added custom headers:

  • key “Authorization” with value “Bearer TheVeryLongSecretTokenGeneratedByTempo
    • I also tried without “Bearer ”.
  • key “Accept” with value “application/json”

Yet, I get a 401 response. :(

1 answer

3 votes
Christoph Päper
Contributor
February 22, 2024

Okay, apparently it helps to write it down. I just tried it again and now it seems to work. The only thing I changed was using the generic base URL https://api.tempo.io/4/.

J-C
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!
March 18, 2024

Can you clarify which of REST API integration or OAuth 2.0 Authentication you used and what change you did ?

I have been using the following https://domain.atlassian.net/plugins/servlet/ac/io.tempo.jira/oauth-authorize/?client_id=clientid&redirect_uri=https://api.tempo.io/4/ without success.

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events