Oauth Jira authentication client issue when requesting token with OAuthTutorialClient-1.0.jar

I’m trying to authenticate my java application against the JIRA REST API using OAuth (1.0a as OAuth 2.0 is not supported).

For this purpose, I’m trying to complete first of all the guide provided by atlassian at: https://developer.atlassian.com/server/jira/platform/oauth/

However, I can´t move on from Step 2. Do the “OAuth dance”. When executing java -jar OAuthTutorialClient-1.0.jar requestToken I’m getting the following error output:

com.google.api.client.http.HttpResponseException: 400
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1070)
at com.google.api.client.auth.oauth.AbstractOAuthGetToken.execute(Abstrac
at com.atlassian.oauth.client.example.JiraOAuthClient.getAndAuthorizeTemp
at com.atlassian.oauth.client.example.OAuthClient.handleGetRequestTokenAc
at com.atlassian.oauth.client.example.OAuthClient.execute(OAuthClient.jav
at com.atlassian.oauth.client.example.ClientMain.main(ClientMain.java:18)

It seems to me there is an issue with my private/public key despite I have followed every previous step showed in the guide. Moreover the error message doesn’t provide any more details besides the above.

My config.properties file looks like this:

#Mon Mar 26 19:41:28 CEST 2018

Anyway, my ultimate goal is to authenticate my java application against the JIRA REST API using OAuth, hence I need to know how to get the access token.

Could you please help on this?

I am having the same problem

Hello @jorge.amatro,

In your config.properties, for jira_home (since you’re using a server deployment), kindly append /jira. Also, I use http instead of https (which works on my setup), so your jira_home entry will look like jira_home=http://jira.myserver.com/jira.

Just to be on the safe side, make sure that private_key does not have any linebreaks.


Hi @jorge.amatro

Were you able to find a solution?
I have the same concerns.

Thank you,

@jorge.amatro/@sofia.skubiy, did you find a solution?

The message error from JIRA is very poor. It’s says “oauth_parameters_absent=oauth_consumer_key&oauth_problem=parameter_absent” for almost anything you configure wrong in the call. not just if forget to pass the consumer key.

Some problems that I came across and resulted in that error:
1- Wrong private key
2- Spaces in private key
3- Wrong consumer key
4- Wrong url
5- The public key configured in the application link and the private key sent doesn’t match

It’s very sad to see such a big API service of a giant organization have this basic issue of not specifying the exact error occurred.