I created Generic application link using a dummy rul my.test.rul to test rest client using oauth. To get the request token i have executed the below command from the commandline which ws mentioned in the documentation

java -jar requestToken JIRA_BASE_URL CALLBACK_URL

I got the below error message. What is wrong I am doing here? Can some one suggest please?

C:\Srinivas\jira rest client jar>java -jar requestToken ""  "http://my.test.url"
Jun 12, 2014 4:18:15 PM org.apache.http.impl.client.DefaultRequestDirector handleResponse
WARNING: Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm="", oauth_problem="consumer_ke
y_unknown"} Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at at com.simontuffs.onejar.Boot.main( Caused by: java.lang.RuntimeException: Failed to obtain request token at com.atlassian.oauth.client.example.AtlassianOAuthClient.getRequestToken( at com.atlassian.oauth.client.example.JIRAOAuthClient.main( ... 6 more Caused by: net.oauth.OAuthProblemException: consumer_key_unknown at net.oauth.client.OAuthResponseMessage.toOAuthProblemException( at net.oauth.client.OAuthClient.invoke( at net.oauth.client.OAuthClient.invoke( at net.oauth.client.OAuthClient.getRequestTokenResponse( at com.atlassian.oauth.client.example.AtlassianOAuthClient.getRequestToken( ... 7 more

5 answers

This widget could not be displayed.

You must use the name "hardcoded-consumer" as the consumer key for the app in Application Links. 

Thanks. i solved this problem.

Can you say what is "hardcoded-consumer" ? I am not getting

Literally that very string, "hardcoded-consumer".

This widget could not be displayed.

Hi atlassians, Any help please?

This widget could not be displayed.

Did you find any solution for this @Srinivas Patruni

This widget could not be displayed.

Did you find any solution ?

This widget could not be displayed.

Read the documentation carefully, you must use the name "hardcoded-consumer" as the consumer key. I now get a 500 error instead of consumer_key_unknown, though.. but that's a step in the right direction?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

225 views 3 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you