Jira Server API returning HTML login page

Hello,

I developed an application to import the Jira Cloud issues from many customers to a single database. This works fine.

Now I’m trying to implemenet a customer that use Jira Server but I always get the HTML login page and the status code is 200. This happens in Postman and in the application.

This is everything I tried:

  • Authorization basic with username and password
  • Authorization basic with username and PAT
  • Authorization bearer token with PAT
  • Header authorization basic with encode base64 and this format: ‘username:password’
  • Header authorization basic with encode base64 and this format: ‘username:PAT’
  • Header authorization bearer with PAT

The URL that I’m doing the call is like this: https://jira.my-company.com. Also I saw in some documentation that use the port 8080 and 8090 and doesn’t retrieve anything

The Jira version is 9.4.7.

What else can I try?

Hello @raga

It’s nothing to do with the authentication method, as a connection to the REST API server hasn’t been established, so it’s totally ‘deaf’ to your communications.

The owners of the Jira Server most likely have their firewall / authentication / proxy system configured for ALL connection requests to https://jira.<theircompanyname>.com/* on port 443, or maybe all ports, to be directed to the GUI user login page.

Liaise with their sys admins and they’ll probably make a whitelist exception rule for https://jira.<theircompanyname>.com/rest/*, on the appropriate port, to allow you bypass the login page and communicate directly to the REST API server.

1 Like

Thanks for your response!

I will get in touch with the sysadmins.