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

how to login jira cloud with(python) rest api without importing jira module ?

what type of authentication(format) are to be used to login jira cloud 

2 answers

0 votes

Hello,

It is basic authentication, but instead of the password you pass API token:

https://confluence.atlassian.com/cloud/api-tokens-938839638.html

hi alexey,

i have already tried this code with token  but getting status 200 and html format code is appearing..

 


import requests
url="https://xxxxxxx.atlassian.net"
body={
"username":"xxxxxxxxx@xxxx.com",
"password":"token"
}
headers = {"content_type":"application/json"}
r=requests.post(url,data=body,headers=headers)
print(r.text)

0 votes

requests is not defined. How to solve 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