Forums

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

Not able to login through JIRA API's

Radha Krishan
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!
April 16, 2018

Trying to login into the JIRA via API's - its not allowing me go further - error message 401 unauthorised

Request - 

curl -D- -u XX@:YYY -X GET -H "Content-Type: application/json" https://goibibo.atlassian.net/rest/api

 

Response - 

HTTP/2 401 

server: Atlassian Proxy/0.1.225

www-authenticate: OAuth realm="https%3A%2F%2Fgoibibo.atlassian.net"

content-type: text/html;charset=UTF-8

strict-transport-security: max-age=315360000; includeSubDomains; preload

date: Mon, 16 Apr 2018 11:54:38 GMT

x-arequestid: c4ef9c30-bf35-4bb7-a31f-191ce1116f11

x-xss-protection: 1; mode=block

x-content-type-options: nosniff

x-seraph-loginreason: AUTHENTICATED_FAILED

  

 <html>

 

<head>

    <title>Unauthorized (401)</title>

    

<!--[if IE]><![endif]-->

<script type="text/javascript" >

    var contextPath = '';

    var DeferScripts = { deferState: 'disabled' };

</script>

<script>

window.WRM=window.WRM||{};window.WRM._unparsedData=window.WRM._unparsedData||{};window.WRM._unparsedErrors=window.WRM._unparsedErrors||{};

WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path"]="\"\"";

WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-rest:curl.cross-origin-resources"]="false";

WRM._unparsedData["jira.webresources:feature-flags.feature-flag-data"]="{\"enabled-feature-keys\":[\"com.atlassian.portfolio.menu.MainMenuEntry\",\"com.atlassian.rm.portfolio.vertigo.AMQ\",\"jira.plugin.devstatus.smartcommits.dvcs.enabled\",\"nps.survey.inline.dialog\",\"jira.export.excel.enabled\",\"com.atlassian.jira.plugins.mail.internal.enabled\",\"com.atlassian.jira.projects.issuenavigator.cachefix\",\"sd.new.settings.sidebar.location\",\"atlassian.rest.xsrf.legacy.enabled\",\"jira.administration.workflow.validation\",\"re-enable.group.endpoints.jra-60287\",\"dvcs.connector.smartcommits.disabled\",\"atlassian.connect.dhe.disabled.awl-gebsun.rhcloud.com\",\"unified.usermanagement\",\"com.atlassian.jira.projects.issuenavigator\",\"com.atlassian.rm.portfolio.vertigo.Licensing\",\"com.atlassian.jira.projects.issue.summary.vignettes\",\"atlassian.aui.raphael.disabled\",\"fusion.dvcs.use_amq_for_executors.enabled\",\"com.atlassian.jira.config.CoreFeatures.PERMISSIONS_MANAGED_BY_UM\",\"com.atlassian.jira.config.CoreFeatures.ON_DEMAND\",\"atlassian.plugin.aci.enabled\",\"com.atlassian.rm.portfolio.vertigo.Provisioning\",\"connect.no-applinks\",\"fusion.dvcs.use_amq_to_invoke_sync.enabled\",\"jira.event.mau.logging.disable\",\"com.atlassian.rm.portfolio.vertigo.issueloading.Database\",\"com.atlassian.portfolio.classicPlans.sunset\",\"atlassian.connect.dhe.disabled.aip-flyingagile.rhcloud.com\",\"com.atlassian.plugins.issuenav.SEND_HEAD_EARLY\",\"jira.baseurl.cdn.enabled\",\"fusion.bitbucket.rebrand\",\"com.atlassian.portfolio.integrations.ClassicPlans.disabled\",\"connect.authentication.oauth2.impersonation\",\"sd.email.mailbox.poppy.migration.poppyonly.enabled\",\"dvcs.connector.repositorydao.ao.enabled\",\"com.atlassian.rm.portfolio.vertigo.Upgrading\",\"fusion.devstatus.devsummary.customfield.jql.enabled\"],\"feature-flag-states\":{\"sd.sla.agent.jql.security.restricted\":true,\"jira.feature.flag.board.issue.modal.labs\":true,\"sd.test.feature.flag.x\":true,\"sd.test.feature.flag.y\":false,\"jira.issue.search.api.databaseonly\":false,\"sd.email.channel.folders\":false,\"jira.issue.search.jql.databaseonly\":false,\"jira.mail.default.mailstore.polling\":true,\"com.atlassian.jira.plugins.mail.size.check\":true,\"jira.instrumentation.laas\":false,\"jira.issue.search.jql.issuepicker.killswitch\":false,\"sd.new.settings.sidebar.location\":true,\"jira.feature.rest.single.step.avatar.upload\":true,\"sd.email.outsider.comments\":false,\"sd.email.add.user.cc\":true,\"jira.login.useBasicAuthFilter\":true,\"jira.ondemand.maintain.trusted.apps\":true,\"jira.mail.fake.default.mail.server\":false,\"jira.issue.search.jql.anonymize\":true,\"com.atlassian.jira.plugins.mail.internal\":false,\"com.atlassian.jira.feature.flag.for.TestFeatureFlagResource\":false,\"com.atlassian.jira.plugins.mail.amq\":true,\"sd.global.portal.search.atlassian.only.tracking\":false,\"jira.feature.flag.board.polling\":true,\"issue.collector.cache.limiter\":true}}";

WRM._unparsedData["com.atlassian.applinks.applinks-plugin:applinks-common-exported.applinks-types"]="{\"crowd\":\"Crowd\",\"confluence\":\"Confluence\",\"remote.plugin.container\":\"Atlassian Connect\",\"fecru\":\"FishEye / Crucible\",\"stash\":\"Stash\",\"jira\":\"JIRA\",\"bamboo\":\"Bamboo\",\"generic\":\"Generic Application\"}";

WRM._unparsedData["com.atlassian.applinks.applinks-plugin:applinks-common-exported.entity-types"]="{\"singular\":{\"refapp.charlie\":\"Charlie\",\"fecru.project\":\"Crucible Project\",\"fecru.repository\":\"FishEye Repository\",\"stash.project\":\"Stash Project\",\"generic.entity\":\"Generic Project\",\"confluence.space\":\"Confluence Space\",\"bamboo.project\":\"Bamboo Project\",\"jira.project\":\"JIRA Project\"},\"plural\":{\"refapp.charlie\":\"Charlies\",\"fecru.project\":\"Crucible Projects\",\"fecru.repository\":\"FishEye Repositories\",\"stash.project\":\"Stash Projects\",\"generic.entity\":\"Generic Projects\",\"confluence.space\":\"Confluence Spaces\",\"bamboo.project\":\"Bamboo Projects\",\"jira.project\":\"JIRA Projects\"}}";

WRM._unparsedData["com.atlassian.applinks.applinks-plugin:applinks-common-exported.authentication-types"]="{\"com.atlassian.applinks.api.auth.types.BasicAuthenticationProvider\":\"Basic Access\",\"com.atlassian.applinks.api.auth.types.TrustedAppsAuthenticationProvider\":\"Trusted Applications\",\"com.atlassian.applinks.api.auth.types.CorsAuthenticationProvider\":\"CORS\",\"com.atlassian.applinks.api.auth.types.OAuthAuthenticationProvider\":\"OAuth\",\"com.atlassian.applinks.api.auth.types.TwoLeggedOAuthAuthenticationProvider\":\"OAuth\",\"com.atlassian.applinks.api.auth.types.TwoLeggedOAuthWithImpersonationAuthenticationProvider\":\"OAuth\"}";

WRM._unparsedData["com.atlassian.crowd.user-provisioning-vertigo-plugin:create-users-resources.isSiteAdmin"]="false";

WRM._unparsedData["jira.webresources:avatar-picker.data"]="{\"isEnabled\":true,\"url\":\"/plugins/servlet/redirectToProfile?target=edit-avatar\"}";

WRM._unparsedData["com.atlassian.jira.jira-header-plugin:dismissedFlags.flags"]="{\"dismissed\":[]}";

 

WRM._unparsedData["com.atlassian.jira.ext.calendar:tipDataProvider.tip"]="{\"suppressTip\":false}";

WRM._unparsedData["com.atlassian.jira.jira-tzdetect-plugin:tzdetect-lib.time-zone-data"]="{\"julyOffset\":19800000,\"tzid\":\"Asia/Kolkata\",\"tzname\":\"(GMT+05:30) Kolkata\",\"janOffset\":19800000,\"enabled\":false}";

WRM._unparsedData["com.atlassian.labs.hipchat.hipchat-for-jira-plugin:resources-init.is-hipchat-enabled-data-provider"]="false";

WRM._unparsedData["jira.webresources:user-message-flags.adminLockout"]="{}";

WRM._unparsedData["com.atlassian.plugins.helptips.jira-help-tips:help-tip-manager.JiraHelpTipData"]="{\"anonymous\":true}";

if(window.WRM._dataArrived)window.WRM._dataArrived();</script>

<link type="text/css" rel="stylesheet" href="//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--3--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-tqqyqk/b/20/3f275e986b7be8b730b334a731c1f9e1/_/download/contextbatch/css/_super/batch.css?adg3Enabled=true&amp;relative-url=true" data-wrm-key="_super" data-wrm-batch-type="context" media="all">

<link type="text/css" rel="stylesheet" href="//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--3--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-tqqyqk/b/20/c12c36c6477c8b01231d1dd368be80aa/_/download/contextbatch/css/atl.general,jira.general,atl.global,jira.global,-_super/batch.css?adg3Enabled=true&amp;agile_global_admin_condition=true&amp;devsummary=true&amp;globalSidebarEnabled=true&amp;jag=true&amp;relative-url=true&amp;sd_operational=true" data-wrm-key="atl.general,jira.general,atl.global,jira.global,-_super" data-wrm-batch-type="context" media="all">

<script type="text/javascript" src="//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--3--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-tqqyqk/b/20/9b837ad6216d1b0220a850246999b68f/_/download/contextbatch/js/_super/batch.js?adg3Enabled=true&amp;locale=en" data-wrm-key="_super" data-wrm-batch-type="context" data-initially-rendered></script>

<script type="text/javascript" src="//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--3--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-tqqyqk/b/20/163d7625968f1b852493aa31af99c49b/_/download/contextbatch/js/atl.general,jira.general,atl.global,jira.global,-_super/batch.js?adg3Enabled=true&amp;agile_global_admin_condition=true&amp;devsummary=true&amp;globalSidebarEnabled=true&amp;jag=true&amp;locale=en&amp;sd_operational=true" data-wrm-key="atl.general,jira.general,atl.global,jira.global,-_super" data-wrm-batch-type="context" data-initially-rendered></script>

<script type="text/javascript" src="//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--3--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-tqqyqk/b/20/9bfbe78980c18e5e8c2dba0ea7f0ef59/_/download/batch/com.pyxis.greenhopper.jira:gh-create-board-adg3-no-condition/com.pyxis.greenhopper.jira:gh-create-board-adg3-no-condition.js" data-wrm-key="com.pyxis.greenhopper.jira:gh-create-board-adg3-no-condition" data-wrm-batch-type="resource" data-initially-rendered></script>

<link type="text/css" rel="stylesheet" href="//d11od6nl13tgep.cloudfront.net/goibibo.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/-tqqyqk/b/20/5cbc8e90c12293ffe6de62b931dc6f64/_/download/jira-lf-contextbatch/css/jira.global.look-and-feel,-_super/batch.css?adg3Enabled=true&amp;relative-url=true" data-wrm-key="jira.global.look-and-feel,-_super" data-wrm-batch-type="context" media="all">

    <meta name="application-name" content="JIRA" data-name="jira" data-version="1001.0.0-SNAPSHOT">

</head>

<body id="jira" class="aui-layout aui-style-default page-type-message"  data-version="1001.0.0-SNAPSHOT" >

    <div class="aui-page-panel"><div class="aui-page-panel-inner">

            <section class="aui-page-panel-content">

                    <header class="aui-page-header"><div class="aui-page-header-inner">

                            <div class="aui-page-header-main">

                                    <h1>Unauthorized (401)</h1>

                                </div><!-- .aui-page-header-main -->

                        </div><!-- .aui-page-header-inner --></header><!-- .aui-page-header -->

                    <div class="aui-message aui-message-warning warning">

                            <p>Encountered a <code>&quot;401 - Unauthorized&quot;</code> error while loading this page.</p>

                            <p><a href="/secure/MyJiraHome.jspa">Go to Jira home</a></p>

                        </div>

                </section><!-- .aui-page-panel-content -->

        </div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel -->

</body>

</html>

 

 

1 answer

0 votes
Ritesh Aggarwal
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!
May 6, 2019

Is there any update on this, as I am also getting the same error message. 

Trying to connect Jira and Ranorex. 

Please assist. 

Paul
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!
May 24, 2019

I have the same issue.

I have tried EVERYTHING to connect to Jira Cloud via api.

 

Please help!

Ritesh Aggarwal
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!
May 24, 2019

I got it fixed for me. Instead of the Password, i generated the Token from Jira and then placed it in the Password field and it worked.

Like Gaurav Jindal likes this
Kabelo
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!
May 24, 2019

Thank you for the reply :)

I have tried your suggestion (using Postman), but still get an error.

I have also been battling to get oAuth working following this example: https://tzhwang.com/category/jira/ but i have not been successful.

I am not sure how to put that entire solution together.

:(

Paul
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!
May 24, 2019

seems like we're not the only people trying to find a solution :(

https://community.atlassian.com/t5/Jira-questions/Using-Jira-API-from-Postman-via-OAuth/qaq-p/704668

Rajkumar Balakrishnan
Contributor
July 11, 2019

I am getting this error since yesterday.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events