I am trying to make a simple api call using Python to Azure DevOps to get list of users. URL is providing results via browser but getting error while scripting as below. I need to further proceed with the json response. Can some one help please? Python version: 3.8.3
Script
import requests
import json
response = requests.get('https://vssps.dev.azure.com/siva*****/_apis/graph/users')
print(response)
print(response.json())
**Output:**
<Response [203]>
Traceback (most recent call last):
File "c:/Users/HP/OneDrive/Documents/github/terraform/azure-aks-kubernetes-masterclass/25-Azure-DevOps-Terraform-Azure-AKS/test.py", line 5, in <module>
print(response.json())
File "C:\Users\HP\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\HP\AppData\Local\Programs\Python\Python38-32\lib\json\__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users\HP\AppData\Local\Programs\Python\Python38-32\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\HP\AppData\Local\Programs\Python\Python38-32\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 4)
