Forums

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

Jira REST API via cookie based auth doesn't return correct cookie

Michail Kypraios
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!
June 7, 2022

Hello,

I'm building a script to connect to the Jira REST API via cookie based auth.

When I use on my script:

session = requests.Session()
a_session.get('https://somejiraserver.com/')
session_cookies = a_session.cookies
cookies_dictionary = session_cookies.get_dict()

jira = Jira(
    url='https://somejiraserver.com/',
    cookies = cookies_dictionary )

The cookies that I get are different from the cookies that I inspect directly on the browser.

If I use the cookies that I get from the request, it does not work, but if I use the cookies that I get when I inspect the browser it works.

Do you have any idea what is wrong?

Thanks in advance.

1 answer

0 votes
Antoine _Klee Group_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2022

Hi, any update on this issue? Which is the session cookie used by Atlassian/Jira? I wish to build a script that performs actions in behalf of the user (via Selenium) and authentify with the session cookie.

Which is it and how do you capture it with the browser? Is it the xsfr cookie we get with document.cookie? This one does not seems to work.

Thanks.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.4
TAGS
AUG Leaders

Atlassian Community Events