I have set up the the public key , downloaded the jar :
rest-oauth-client-1.0.one-jar.jar
rest-oauth-client-1.0-sources.jar
but when trying to execute :
java -jar rest-oauth-client-1.0.one-jar.jar requestToken https://mycompanyname.atlassian.net ,
I am getting a weird error.. I have set up the consumer key
Jul 01, 2015 3:38:26 PM org.apache.http.impl.client.DefaultRequestDirector handleResponse WARNING: Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm="https%3A%2F%2Fmycompanyname.atlassian.net", oauth_problem="consumer_key_unknown"} Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.simontuffs.onejar.Boot.run(Boot.java:340) at com.simontuffs.onejar.Boot.main(Boot.java:166) Caused by: java.lang.RuntimeException: Failed to obtain request token at com.atlassian.oauth.client.example.AtlassianOAuthClient.getRequestToken(AtlassianOAuthClient.java:66) at com.atlassian.oauth.client.example.JIRAOAuthClient.main(JIRAOAuthClient.java:52) ... 6 more Caused by: net.oauth.OAuthProblemException: consumer_key_unknown at net.oauth.client.OAuthResponseMessage.toOAuthProblemException(OAuthResponseMessage.java:83) at net.oauth.client.OAuthClient.invoke(OAuthClient.java:306) at net.oauth.client.OAuthClient.invoke(OAuthClient.java:260) at net.oauth.client.OAuthClient.getRequestTokenResponse(OAuthClient.java:190) at com.atlassian.oauth.client.example.AtlassianOAuthClient.getRequestToken(AtlassianOAuthClient.java:57) ... 7 more
Can somebody help me to resolve this error..
Please Don't suggest me thishttps://developer.atlassian.com/jiradev/api-reference/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-oauth-authentication link
I've been trying the same with python , but in that I'm not getting how to fetch consumer secret.
Kindly reply
Community moderators have prevented the ability to post new answers.
Just remove the "/ " at the end of the JIRA base url.
java -jar rest-oauth-client-1.0.one-jar.jar requestToken https://your-jira-base-url http://your-redirected-url
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.