Knowledge Base Articles
Breadcrumbs

"Invalid grant" error when using the Tempo Cloud REST API

This article is for Tempo for Cloud



Question

I am getting an error when trying to use the REST API. It says "invalid grant". What can I do?

Answer

The authorization code expires very quickly (60 seconds). If you get this error when trying to retrieve an access token (step 2 of our REST API documentation ), you will need to generate a new code by repeating the first step:

Get the Client ID and the Client Secret found in Apps > Tempo > Tempo Settings > OAuth 2.0 authentication; make sure that you chose "authorization code" as the "authorization grant type". After that, you can make a GET request with the following parameters:

https://jira-cloud-instance-name.atlassian.net/plugins/servlet/ac/io.tempo.jira/oauth-authorize/?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&access_type=tenant_user

Please note: remember to use the code on step 2 quickly, or this "invalid grant" error will appear again.