Forums

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

Server Rest API 401 error

Blake Mitchell
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!
July 9, 2021

I am using this documentation: https://docs.atlassian.com/software/jira/docs/api/REST/8.14.1/#auth/1/session-login

 

I am using basic auth (I also tried token based auth since I read that basic auth might be depreciated but it didn't specifically say for the server api)

 

Authorization: Basic encodedBase64String of username:password

 

I do not get a normal error message rather a bunch of HTML. This is the beginning:

 

function printDeprecatedMsg() { if (console && console.warn) { console.warn('DEPRECATED JS - contextPath global variable has been deprecated since 7.4.0. Use `wrm/context-path` module instead.'); } }

 

I am using for the url: https://jira.myCompanyName.com/rest/api/2/permissions

and doing a GET request in this example

 

Can someone help me get the server REST API working properly?

 

 

1 answer

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
July 9, 2021

hi @Blake Mitchell , welcome on the community. Can you describe how do you access the REST API? From browser, Java, JS code...?

Blake Mitchell
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!
July 12, 2021

Hello - currently, I am using Postman to do it and will be using Kotlin moving forward after that. Do you have any suggestions

 

Thank you

Blake

Martin Bayer _MoroSystems_ s_r_o__
Community Champion
July 12, 2021

Can you share screenshot of the postman configurations?

Suggest an answer

Log in or Sign up to answer