Tried connecting jira using api with username and profiletoken in password but it returns 401-unauthorized
we connect web ui using sso
Welcome to the community @Uncleweb !
Which app you are using? Postman? Are you also using a programming language to fetch data?
Make sure that for your username you use your email and for the password that you are using the Jira API token.
@Nikola Perisic I am using postman and I am using my mail id and Jira api token
do you think it could be that some restriction at jira is not letting me call api?
@Uncleweb
I am using Postman as well, and for authorization I am using the Basic Auth. Are you using the same auth type?
yes
Hi @Uncleweb
I think there is some confusion over the terms used here. Personal Access Tokens (PATs) are only used within our Server and Data Center products as explained in Using Personal Access Tokens.
If you happen to be using an Atlassian Cloud site, those instructions should be disregarded. Instead for Atlassian Cloud please see Manage API tokens for your Atlassian account to understand how to create an API token your Atlassian Account can use for our Cloud services. Also the steps in Basic auth for REST APIs are useful for learning the expected means of supplying this token within a header.
@Andy Heinzer thanks for pointing out and I can confirm that this 401 authorized on data center product
@Andy Heinzer After changing "Type" from basic to bearer now I can get 200 OK but in response getting whole html page source code which cantans lot of hyper links along with login page asking username and password.
Any hints?
What endpoint are you calling in your REST request? Perhaps it might help to see the command you are trying to run. But I would recommend that you not post your actual PAT or your actual URL here in Community, as this is a public site.
It looks like you're new here. Sign in or register to get started.