Reputation: 131
Looking into different methods to create users remotely. Does anyone have an example of this working, or know why this chunk of code isnt working?
import jira.client
from jira.client import JIRA
print('starting script')
options = {'server' : 'http://<server>.atlassian.net'}
jira = JIRA(options, basic_auth=('<username>', '<password>'))
jira.add_user('testUser1', '<emailaddress>', '12345', 'testUser1', False, True, False)
print('ending script')
Whenever I run this, I get a brick of error code that ends with "response text = {"errorMessages":["Either the 'username' or the 'key' query parameters need to be provided"],"errors":{}}"
Any help would be greatly appreciated!
Upvotes: 3
Views: 1650
Reputation: 131
When setting options, I used http instead of https. This fixed my problem
Upvotes: 1