unable to get data using rest call with python

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



unable to get data using rest call with python



I am trying to make a rest call to put data from a remote site as follows:


import requests
from requests.auth import HTTPDigestAuth
url = 'https://<private_site>:8021/rest/management/reports/create/jvm?type=XML&format=XML+Export&source=live:app1&filter=tf:CustomTimeframe?1533008450802:1533019250802'
try:
r = requests.get(url, auth=HTTPDigestAuth('user', 'passwd'))
except requests.exceptions.RequestException as e: # This is the correct syntax
print e
sys.exit(1)



I can pull the url in the browser with no problem but when I try to get it with python, I get 401 error. Any ideas what I am doing wrong here?




1 Answer
1



Most likely your user/password combination is wrong.



401 Unauthorized



https://httpstatuses.com






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered