It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira cloud REST API - Login endpoint is always giving me 401 error

Hi Team,

 

I am using JIRA cloud system. and i want to use the public REST api in due automation furthers.

 

I am trying to login using the following endpoint:

POST https://awajieh.atlassian.net/rest/auth/1/session

BODY {"username":"my email", "password":"mypassword"}

 

Response

{    "errorMessages": [        "Login failed"    ],    "errors": {}}

 

What is the issue since i am login on web portal using the same information and i am able to login.

 

please verify

2 answers

2 votes
Veera Atlassian Team Jan 19, 2020

Hi @awajieh 

Using passwords with Jira REST API basic authentication has been deprecated. You need to create API token and use it in the REST call.

 

Below document explains how to create and use API token for authentication.

https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

edwin Community Leader Jan 19, 2020

This is before I saw @Veera's answer

Like Veera likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you