Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA OAuth update password and upload file is getting 405 error

Janardhan Reddy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 24, 2018

HI Team,

Could anyone help on JIRA OAuth change password and upload file API is getting 405 Method not allowed error. Using JIRA basic authentication it is used to work fine..

My code looks like 

url: www.example.com:8444/rest/api/2/user/password?username=testUser1

data = "{\"password\":\"" + newPassword + "\"}"; 

aOAuthGetAccessToken oAuthAccessToken = getJiraOAuthGetAccessToken(accessToken, secret, JIRA_COMSUMER_KEY, JIRA_PRIVATE_KEY);
oAuthAccessToken.verifier = secret;
OAuthParameters parameters = oAuthAccessToken.createParameters();

HttpRequestFactory requestFactory = new NetHttpTransport().createRequestFactory(parameters);
HttpRequest request = requestFactory.buildPostRequest(url, ByteArrayContent.fromString("application/json", data ));
request.getHeaders().setContentType("application/json");

HttpResponse response = request.execute();

1 answer

0 votes
Janardhan Reddy March 25, 2019

I'm also facing same issue.. could anyone please help.

Suggest an answer

Log in or Sign up to answer