Good afternoon, could someone help me? How do I validate the user in Jira ? I'm using Python, below is my code. When the user is not registered in Jira he send me an error
class Atlassian: JIRA_FIT = 'https://atlassian.net' jira_api_issue = '/rest/api/2/issue/'
def __init__(self, usuario, token): try: self.jira = Jira( url=self.JIRA_, username= usuario, password= token ) except: print("An exception occurred")
Hello @Watson Vieira da Rocha ,
Welcome to the Atlassian Community!
I am not sure I understand what you mean with "validate the user in Jira". Can you kindly provide more details on what you are trying to achieve?
In case you are actually asking how to authenticate REST API calls in Python using basic auth (with Atlassian account email address and API token), then you can find an example in below thread:
If you are trying to do anything else, please let me know.
Cheers,
Dario
Hello @Dario B How are you ?
I need to do something like, if the user enters their wrong password or their wrong login that returns an error like "Wrong or unregistered password or login"
Thanks very much !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't have enough context to be able to help you and I am not even sure what you are trying to achieve can actually be done since REST API calls are not authorized using the same credentials the users enter when they log-into Jira Cloud.
The different ways to authorize REST API calls are listed below:
However, if you are looking for advise on how to develop your app then I might not be the best person to help. I'd advise to try the resources listed in https://developer.atlassian.com/resources instead.
Specifically:
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.