Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Oauth jira authentication client returns 405 when requesting token

Edited

Hi all,

I am following instructions at https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication/ to get the access token for jira api access. However, at the step of requesting temporary token by calling the request-Token endpoint(/plugins/servlet/oauth/request-token), it keeps returns 405 Method Not Allowed for me.  When I changed the method from "post" to "get", this error is gone, however returns null token. So it looks to me my private key and consumer key are passed correctly, so what could be wrong?

com.google.api.client.http.HttpResponseException: 405 Method Not Allowed
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1070)
at com.google.api.client.auth.oauth.AbstractOAuthGetToken.execute(AbstractOAuthGetToken.java:73)
at com.atlassian.oauth.client.example.JiraOAuthClient.getAndAuthorizeTemporaryToken(JiraOAuthClient.java:37)
at com.atlassian.oauth.client.example.OAuthClient.handleGetRequestTokenAction(OAuthClient.java:69)
at com.atlassian.oauth.client.example.OAuthClient.execute(OAuthClient.java:51)
at com.atlassian.oauth.client.example.ClientMain.main(ClientMain.java:18)

Process finished with exit code 0

 

My config.properities file is:

jira_home=https\://jira-test.company.com
consumer_key=userconsumerkey
private_key=x2DbAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAL0n4Cl6g77wLviGZCby50Ba/LlUa2JNpqtCKbi0ZwqUHDKxpbO3vbCHowFPKBDi2wz0rjHj/YltcUfkomP8j8ZuqRavREoBPBVzl08jz08CwVtxSdd5qjknAv9PJ6CQy4Z/pGuVKj5d9zowoirOGF8W2uquZae1SPPkGS1TAN45AgMBAAECgYEArGvbxpN54iOX/UyroGFMcHo/4kPUetAje/qcg1RWlOr7ZS5PyClVzMNmz7uy3umbGQ00eB/FrW7IkusTJ6dB+eGPYdRC3zT28F8/siXVKo+KUcgvQGXNnmnlGmZzOQho2d3gWms83V+NXeQmZw1rqe8YQZ32r3fXQe5+96D+xQECQQDwMuXrom082DGMLIa+8b392GKMYb8VJc8wMf35Ouxj9dP6q50989f/xSK34apTpM06VuEG0EV1/X2qU/4l0zihAkEAyZlhOD22dQr1ySdrmzOsfCdOERi48zWX5FCFmFKi6Cv45fBbwNgYQxv+xXfCYgFGWdw2pA4wZN2AdcTvaUhGmQJBAObtGC0tcHZBp4kLOdSTl0RYZ45tXwcW3ZWJSpH1O1Vy/wSNP1RTfcNxpK0xH4rg80n2QsuJKm6gcdNygvGcm2ECQEpq0/huz2tlIFWgt5gS+xjZaXfmKF+e6PLexnH0Dy6lDLvUfgoxusMLEoDSNG75CX8iSwlEM5kIKuNOTxIOHAECQQCmfDnhNmIyFnFqny1I7DhaobE7FjOjn57P4qN1yr9E7IKU7psT3VvIUljO41aqe42NuN3/4C0+9CIn+ugLtIJl

 

thank you very much

1 answer

0 votes
Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 12, 2020 • edited

Hi there!

Firstly, I would strongly recommend you delete/edit this post to remove config.properties information from the post, as it contains sensitive information that you do not want shared.

Secondly, I do not think this is the right place to post this question, as this is the community for the Automation for Jira. I think you're looking for 'Jira' community, so maybe remove this post and repost your question (without the key info) there.

Thanks!

Thank you for your response.

I did modify the private key and other confidential info when posting here but thank you for bringing this up

Just an update the issue is fixed by not using string concat for the private key string, instead of converting it to one line string.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events