I am trying to retrieve a list of our users from our Jira Server instance. I have no problem with the first request for the 1000(hard limit of 1000 on Jira server) but when I iterate through for my second request I get a 401 error saying I am unauthorized. I have never had this issue in the past.
```
emails = []
range = [0, 1000]
session = requests.Session()
for ind in range:
tgt = "https://host.example.com/rest/api/2/user/search?username=.&start-index=" + str(ind) + "&maxResults=1000"
print(tgt)
response = requests.get(tgt, headers=headers,auth=HTTPBasicAuth(user, pwd))
print(response.headers)
result = response.json()
```
Any help would be much appreciated. This is pretty simple stuff.